An error occurred while using presentModalViewController.

Source: Internet
Author: User

Function Description:
The existing UI structure is VC0, VC1, and VC2. VC0 is the rootViewController of the application and contains the view of VC1. VC1 also contains the view of VC2. There is a button in VC2. Click it and call the system's mail function to bring up the mail sending interface.
 
Problem:
Use VC2 as the delegate of MFMailComposeViewController. click the button and perform the following operations:
[Self presentModalViewController: mailPicker animated: YES];
[MailPicker release];
 
It is used to display the email interface, but the problem occurs and is normal on the ipad. If it is replaced with an iPhone, it cannot be displayed normally, the device cannot be identified horizontally, or the layout of other controls in VC2 is affected.
 
Whether it is viewing the scaling support of controls and interfaces or supporting direction conversion, it still cannot be solved. In addition, if the interface is displayed in VC2, the interface may be blocked by other interfaces or controls in VC0 or VC1 due to the hierarchical relationship.
 
Solution:
Similar interface display is implemented in the VC at the root layer. It turns out that it is no problem to implement this function in VC0.

From zhao_yin notepad

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.