MFMessageComposeViewController's "To" input textfield disappears when setting a UINavigationBar's backgroundImage using its appearance proxy

Originator:kasper.muncken
Number:rdar://15667679 Date Originated:16-Dec-2013
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification:UI/Usability Reproducible:Always
 
Kasper Munck16-Dec-2013 01:26 PM

Summary:
In an iOS application where the UINavigationBar's backgroundImage is customised globally using [UINavigationBar appearance], an MFMessageComposeViewController presented modally will have a transparent rectangle instead of a "To" textfield. This will turn into a black rectangle when the modal presentation of the MFMessageComposeViewController is completed.

This has two unfortunate consequences:

1) It is not possible to change or select the receiver of the message.

2) A black rectangle is a huge UI flaw that confuses the user and destroys the UX.

Steps to Reproduce:
1. Create a new 'Single View Application' project for iOS.

2. Link with MessageUI.framework. 

3. In viewDidLoad of ViewController.m, use [UINavigationBar appearance]'s setBackgroundImage:forBarMetrics: to change the global backgroundImage of the UINavigationBar class.

4. In Main.storyboard drag a UIButton onto ViewController's view.

5. Create an IBAction for that button. Named it presentMessage:

6. In presentMessage: present an instance of MFMessageComposeViewController modally.

Expected Results:
When presenting a MFMessageComposeViewController after changing UINavigationBar's backgroundImage using the appearance proxy it is expected that the MFMessageComposeViewController's UINavigationBar's backgroundImage will appear changed, while all other UI elements will appear as unchanged.

Actual Results:
MFMessageComposeViewController's UINavigationBar's backgroundImage is changed, but now - instead of a "To" textfield - a transparent rectangle (appearing black when the modal presentation is completed) appears instead.

Version:
Tested on an iPhone 5S with iOS version 7.0.4 (11B554a).
Sample app is built with iOS SDK 7.0.

Notes:
Whether the UI of OS controllers such as MFMessageComposeViewController should be modified or not is likely to be subject of discussion. However, modifying UINavigationBar's appearance should not have incidental consequences such as the one outlined here.

Configuration:
-

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!