Appearance Manager should not affect App Extensions, Mail Compose View Controllers, Message Compose View Controllers, or Safari View Controllers

Originator:jbrayton
Number:rdar://28923267 Date Originated:2016-10-24
Status:Open Resolved:
Product:iOS Product Version:10.0.2 (14A456)
Classification:UI/Usability Reproducible:Always
 
Appearance Manager settings sometimes affect the drawing of app extensions, Mail Compose View Controllers, Message Compose View Controllers, and Safari View Controllers. This is undesirable because those view controllers do not otherwise share the look and feel of the app.

The most extreme case is app extensions. The developer of an app often can't know or test every extension that might be invoked within an app.


Steps to Reproduce:

1.  Open the attached sample project.

2.  Note the following code in AppDelegate.swift that is run when the app is launched:

// Make the titles of buttons and UIBarButtonItems red. Make navigation bar backgrounds red.
UIButton.appearance().setTitleColor(UIColor.red, for: .normal)
UINavigationBar.appearance().backgroundColor = UIColor.red
UIBarButtonItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.red], for: .normal)

3.  Run the app on a device that is configured to send mail and messages. (If run in a Simulator or on a device not configured this way, demonstrating with the Mail Compose View Controller and Message Compose View Controller will not work.)

4.  Tap "Share Text", and then invoke Mail from the share sheet. Note the red background on the navigation bar of the mail sheet.

5.  Tap "Cancel".

6.  Tap "Mail Compose View Controller.  Note the red background on the navigation bar of the Mail Compose View Controller.

7.  Tap "Cancel".

8.  Tap "Message Compose View Controller".  Note the red background on the navigation bar of the Message Compose View Controller.

9.  Tap "Cancel".

10.  Tap "Safari View Controller". Note the red "Done" button.


Expected Results:

I would expect the Appearance Manager calls not to affect these external view controllers.

Actual Results:

As noted in the Steps to reproduce, the calls do affect the external view controllers.


The sample project is available at:
https://www.dropbox.com/s/vt9xsnm9qslmzr1/AppearanceManager.zip?dl=0

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!