Cannot show modal ViewController in iOS7

前端 未结 10 1012
借酒劲吻你
借酒劲吻你 2020-12-06 02:06

I tried to show system defined viewcontrollers (MFMailComposeViewController, TWTweetComposeViewController,etc..) as a modal view.

But these viewcontrollers dosn\'t a

相关标签:
10条回答
  • 2020-12-06 02:29

    Turns out the issue only shows up when customizing UIBarButtons. If we use the following in our 32-bit app running on iPhone 5s, we have the problem:

    [[UIBarButtonItem appearance] setTitlePositionAdjustment:UIOffsetMake(0, 1.0)
                                               forBarMetrics:UIBarMetricsDefault];
    

    Leaving out that line works around the problem. We have filed a radar.

    0 讨论(0)
  • 2020-12-06 02:31

    NSXPCConnectionInterrupted = 4097. I would have your code retry the command as the error looks to be transient.

    0 讨论(0)
  • 2020-12-06 02:35

    I had the same error when use SLComposeViewController to share with Facebook or Twitter using the simulator of 64-Bits or an iPhone 5s, then i delete every line of code that use "appearance, for example [UITableViewCell appearance] or [UIBarButtonItem appearance], and every run ok.

    0 讨论(0)
  • 2020-12-06 02:38

    This post helped me find a solution to a similar issue. But my problem was not related to the tab bar, so I figured I'd share if anyone else comes across this post:

    The mail modal opened when tapping a table cell, but would instantly dismiss. In my case, this code caused the problem:

    [[UILabel appearanceWhenContainedIn:[UITableViewHeaderFooterView class], nil] setFont:[UIFont systemFontOfSize:17.0]];
    

    I deleted it, and everything works!

    0 讨论(0)
提交回复
热议问题