Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:LocalizedString(@"Success")
- message:LocalizedString(@"Example") preferredStyle:UIAlertControllerStyleAlert];
- UIAlertAction *actionOk = [UIAlertAction actionWithTitle:LocalizedString(@"Ok")
- style:UIAlertActionStyleDefault
- handler:^(UIAlertAction *action){
- [self dismissViewControllerAnimated:YES completion:^
- {
- [self performSelector:@selector(presentLogInViewController) withObject:nil];
- }];
- }];
- [alertController addAction:actionOk];
- [self presentViewController:alertController animated:YES completion:nil];
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:LocalizedString(@"Success")
- message:LocalizedString(@"Example")
- preferredStyle:UIAlertControllerStyleAlert];
- UIAlertAction *actionOk = [UIAlertAction actionWithTitle:LocalizedString(@"Ok")
- style:UIAlertActionStyleDefault
- handler:^(UIAlertAction *action) {
- [self performSelector:@selector(presentLogInViewController) withObject:nil];
- }];
- [alertController addAction:actionOk];
- [self presentViewController:alertController animated:YES completion:nil];
- UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action)
- {
- [alertController dismissViewControllerAnimated:YES completion:nil];
- }];
- [alertController addAction:cancelAction];
- [self presentViewController: alertController animated:YES completion:nil];
- UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert"
- message:@"This is an alert."
- preferredStyle:UIAlertControllerStyleAlert];
- UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
- handler:^(UIAlertAction * action) {
- // here you can add the completion for when the OK button is pressed
- }];
- [alert addAction:defaultAction];
- [self presentViewController:alert animated:YES completion:nil];
Add Comment
Please, Sign In to add comment