UIAlertController: Alert and Action Sheet in iOS
In this tutorial, I will show you the new way to display an alert message to the user and associate user actions with that alert message in your iOS app.
UIAlertView and UIActionSheet, introduced in iOS 2, were deprecated in iOS 8. And now, starting from iOS 8, they have both been replaced by UIAlertController. But for apps that target prior versions of iOS 8, you should still use the UIAlertView class to display an alert message to the user and the UIActionSheet class to present the user with a set of alternatives for how to proceed with a given task. Action sheets are also used to prompt the user to confirm a potentially dangerous action (for example, to request the user to confirm to delete a file). If you need to show alerts in apps before iOS 8, you should read our iPhone user alerts post. We have recently updated this post by adding Objective-C and Swift side by side.
Keep reading


















