UIAlertView first deprecated IOS 9

From iOS8 Apple provide new UIAlertController class which you can use instead of UIAlertView which is now deprecated, it is also stated in deprecation message: UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead So you should use something like this UIAlertController * alert = [UIAlertController alertControllerWithTitle:@”Title” message:@”Message” preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction* yesButton = [UIAlertAction … Read more

Customizing UIAlertView

I think your best bet is to forget customizing UIAlert view and build a custom view yourself. For one, what you’re showing really isn’t an “alert” so it’s counter to what UIAlertView is designed to be for. This means that you’re changing the UI paradigm on the user which is never a good idea. Second, … Read more

How would I create a UIAlertView in Swift?

From the UIAlertView class: // UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead On iOS 8, you can do this: let alert = UIAlertController(title: “Alert”, message: “Message”, preferredStyle: UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title: “Click”, style: UIAlertActionStyle.Default, handler: nil)) self.presentViewController(alert, animated: true, completion: nil) Now UIAlertController is a single class for creating and interacting with what … Read more

UIAlertController custom font, size, color

Not sure if this is against private APIs/properties but using KVC works for me on ios8 UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@”Dont care what goes here, since we’re about to change below” message:@”” preferredStyle:UIAlertControllerStyleActionSheet]; NSMutableAttributedString *hogan = [[NSMutableAttributedString alloc] initWithString:@”Presenting the great… Hulk Hogan!”]; [hogan addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:50.0] range:NSMakeRange(24, 11)]; [alertVC setValue:hogan forKey:@”attributedTitle”]; UIAlertAction *button = … Read more