UIAlertController new capabilities in iOS 10?

Hi,

I took a look to iOS 10 and I noticed that the way informations are displayed in UIAlertController is really different.

For example, if you go in the Address Book app and select a user with several phone numbers, when you tap on the call button, an UIAlertController(?) is displayed to choose the phone number to call.
This UIAlertController contains :

  • An icon
  • Actions with text on 2 lines and styled text (bold)

On iOS 9, if you do the same, a basic UIAlertController is displayed.

The Music app contains also “enhanced” UIAlertController like this one : http://assets.ilounge.com/images/articles/inside-the-betas/ios10-music/itb-ios10-music-7.jpg

As far as I know the API of UIAlertController has not changed and doesn’t allow this kind of things.

Do you know if iOS 10 introduce new API that allows this kind of design or you think that this “UIActionControllers” are in fact custom components made by Apple?

Thanks for your help.

I’ve seen the alert you mean, but the [iOS 10 diffs] (UIKit Changes for Objective-C) don’t show any enhancements or changes for UIAlertController - this might be one of those cases of Apple being able to do something in their apps that we can’t.

Looking at the NSHipster page on UIAlertController it looks like we can currently do everything except include the icon. It may be possible to iterate over all the views and to find the correct view to add an icon to (as UIAlertController is a UIViewController) though. Since UIViewController is documented there should be no trouble if you access its views.

1 Like

Thanks for your quick answer!