-
Notifications
You must be signed in to change notification settings - Fork 0
ActionSheet 0
Mohammad Azmal Hossain edited this page Mar 6, 2017
·
1 revision
let myActionSheet = UIAlertController(title: "Delete all data ?", message: "You may not be able to recover this back", preferredStyle: UIAlertControllerStyle.actionSheet)
myActionSheet.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil))
myActionSheet.addAction(UIAlertAction(title: "Delete", style: UIAlertActionStyle.default, handler: { (ACTION :UIAlertAction!)in
print("Deleting the data...")
}))
myActionSheet.addAction(UIAlertAction(title: "Delete Permanently", style: UIAlertActionStyle.destructive, handler: { (ACTION :UIAlertAction!)in
print("Deleting data permanently...")
}))
self.present(myActionSheet, animated: true, completion: nil)