AlertSheet is a user interface alert inspired by UIActionSheet.
- Beautiful design
- Customizable
- Simple and lightweight
- Future proofed for all screen sizes
- iOS 7.0+
Drag and drop AlertSheet.swift, AlertSheetButton.swift and AlertSheetLabel.swift into your project.
let alertSheet = AlertSheet(
title: "Network Error",
message: "You appear to be offline. Check your connection and try again.",
buttonTitle: "OK",
image: nil
)
alertSheet.delegate = self
alertSheet.showInView(view)// MARK: - AlertSheetDelegate Protocol
func alertSheet(alertSheet: AlertSheet, clickedButtonAtIndex buttonIndex: Int) {
switch buttonIndex {
case 0: alertSheet.dismiss()
default: alertSheet.dismiss()
}
}AlertSheet is released under the MIT license. See LICENSE for details.
