【问题标题】:Layout gets messy after dismissing the MFmailComposeViewController关闭 MFmailComposeViewController 后布局变得混乱
【发布时间】:2016-02-09 09:24:53
【问题描述】:

我的问题类似于this

但是我将我的视图嵌入到滚动视图中,按照这篇文章我的问题仍然存在,有什么办法可以解决这个问题吗?

【问题讨论】:

  • 你能分享屏幕吗?

标签: ios objective-c mfmailcomposeviewcontroller


【解决方案1】:

如果页面布局出错,尤其是在表格视图或滚动视图中,您可以调用:

[self.view layoutIfNeeded];

这将检查所有自动布局并在需要时将其移动以进行更正。我建议您在确定关闭 MFMailComposeViewController 后调用它。

【讨论】:

    【解决方案2】:

    当您呈现PickerViewMFMailComposeViewController 时,只需编写以下代码。

    [[[[AppDelegate sharedInstance] window] rootViewController] presentViewController:aImagePicker animated:YES completion:nil]
    

    也许这段代码会对你有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-19
      • 1970-01-01
      • 2014-07-02
      • 1970-01-01
      • 2015-12-07
      • 2021-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多