UIAppearance -appearanceWhenContainedIn: with MFMailComposeViewController bug

Originator:phillips1988
Number:rdar://13757733 Date Originated:28-apr-2013
Status:Duplicate Resolved:
Product:iOS Product Version:6.0
Classification:Serious Bug Reproducible:Always
 
Duplicate of #12328070



Summary: I want to customise the appearance of MFMailComposeViewController's NavigationBar using -appearanceWhenContainedIn: but the customisations aren't visible in iOS 6, the same code works as expected in iOS 5.

Steps to Reproduce: Include the following code in a project which will display an MFMailComposeViewController - 
[[UINavigationBar appearanceWhenContainedIn:[MFMailComposeViewController class], nil] setTintColor:[UIColor redColor]];

Expected Results: Instances of MFMailComposeViewController should have a NavigationBar with a red tint.

Actual Results: MFMailComposeViewController instances maintain the default appearance.

Regression: This feature was working correctly in iOS 5.0

Comments

Yes Saniul, I remember reading about these remote view controllers a while ago. It's interesting to see that on iOS devices with 3.5" screens running iOS 6.x, the mail compose controller does initially use the settings you defined in -appearanceWhenContainedIn:, but only the first time. Other tries fail.

This is very interesting, proving it can be done, but there is obviously a bug. So, we can probably expect this fixed in iOS 7.

By phillips1988 at May 2, 2013, 4:08 p.m. (reply...)

Remote View Controllers

This happens because Apple started using XPC in iOS 6 and View Controllers such as MFMailComposeViewController are actually run in a seperate process.

You can read more about it here: http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/

By saniul.ahmed at May 1, 2013, 11:11 a.m. (reply...)

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!