Uialertcontroller example objective c

In this article let’s discuss about Uialertcontroller example objective c. Let’s go through the following methods without any delay 🙂

Method 1:

UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert"
	message:@"This is an alert."
	preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
	handler:^(UIAlertAction * action) {}];

[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];

Hope the above methods works for you. Happy Learning and get back to us Anytime.

Realted Posts : How to get product image woocommerce