UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@”Hey!” message:@”Hey have you visited iostpoint.wordpress.com website?” preferredStyle:UIAlertControllerStyleAlert];

           UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@”Yes” style:UIAlertActionStyleDefault
                                                            handler:^(UIAlertAction * action) {
                                                                     ;
                                                                   //do something
                                                                 }];

           UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@”No” style:UIAlertActionStyleDefault
                                                                handler:^(UIAlertAction * action) {
                                                                   //do something
                                                                }];

           [alertController addAction:defaultAction];
           [alertController addAction:cancelAction];

          UIView * topView = alertController.view.subviews.firstObject;
          UIView * nextView = topView.subviews.firstObject;
           nextView.backgroundColor = [UIColor yellowColor];
           [self presentViewController:alertController animated:YES completion:nil];

Enjoy Coding 🙂

Advertisements