UIAlertController introduced in iOS 8 .UIAlertController replaces the UIActionSheet and UIAlertView classes. UIAlertController can be used for displaying
alerts ,confirmationalert ,act as action sheet and used for login purpose etc. If you want to add
button to UIAlertController there is a class named UIAlertAction .
UIAlertAction provides an action handler with block which gets called when the button get tapped. Here we are using UIAlertController for login purpose below is the sample of UIAlertController -