FWPopupView is a customizable popup library for iOS. It provides alert, sheet, date picker, menu, custom sheet, and radio button components.
- iOS 12 or later
- Swift 5
- Xcode 14 or later
Add the package in Xcode using the following repository URL:
https://github.com/MosaviOrg/FWPopupView.git
Select the FWPopupView product for your app target.
To use the package from a manifest:
.package(url: "https://github.com/MosaviOrg/FWPopupView.git", branch: "master")For local development:
.package(path: "../FWPopupView")SnapKit is resolved automatically as a package dependency.
use_frameworks!
pod "FWPopupView", "~> 4.2"import FWPopupView
let alert = FWAlertView.alert(
title: "Title",
detail: "Message"
) { _, _, _ in
print("Confirmed")
}
alert.show()let sheet = FWSheetView.sheet(
title: "Options",
itemTitles: ["First", "Second"],
itemBlock: { _, index, title in
print("Selected: \(index), \(title ?? "")")
},
cancenlBlock: {
print("Cancelled")
}
)
sheet.show()let datePicker = FWDateView.date { picker in
print(picker.date)
}
datePicker.show()let menu = FWMenuView.menu(itemTitles: ["Edit", "Delete"]) { _, index, title in
print("Selected: \(index), \(title ?? "")")
}
menu.show()FWPopupView is available under the MIT license.