In iOS8 UIAlertController replaces UIActionsheet and UIAlertView. An AlertController can be created with a "title" and a "message".
We can set two styles to an AlertController. Which is given below.
(a)UIAlertControllerStyleActionSheet - for configuring UIAlertController as an ActionSheet
(b)UIAlertControllerStyleAlert - for configuring UIAlertController as an Alert.
We can set two styles to an AlertController. Which is given below.
(a)UIAlertControllerStyleActionSheet - for configuring UIAlertController as an ActionSheet
(b)UIAlertControllerStyleAlert - for configuring UIAlertController as an Alert.
How to create an Alert/ActionSheet
- Creating an AlertController object
- Adding an Action
The handler block can be used to get the call back when “ok” button is pressed.
- Presenting the alertController
How to create a simple Alert with OK button and a message
The Alert will be looking like as given below.
The Alert will be looking like as given below.
The ActionSheet will be looking like as given below.
Good.
ReplyDeleteThanks.
Thank you.
ReplyDelete