iphone - presentModalViewController 什么都不做

标签 iphone ios uiviewcontroller uinavigationcontroller modal-dialog

我有一个 UIViewController(parent)调用 presentModalViewControllerviewDidLoad 上的另一个 UIViewController(child)。

如果 parent 没有 UINavigationController,则 presentModalViewController 什么都不做。如果它有 UINavigationController,则 presentModalViewController 会按预期显示 child

这是 presentModalViewController 的标准行为还是这里有其他问题?

最佳答案

因为你是在viewDidLoad中呈现,试试在viewDidAppear中呈现。

关于iphone - presentModalViewController 什么都不做,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4059790/

相关文章:

iphone - 应用程序在后台时获取屏幕截图? (允许私有(private) API)

ios - 架构 armv7 的 undefined symbol : "_OBJCCLASS$_ALAssetsLibrary"

iphone - AVAudioPlayer:音量按钮在某些设备上有效,而在其他设备上无效

ios - 从 Xcode 6 仅将单个开发人员帐户导出到 .developerprofile

ios - 多个 ViewController(containerView?childView?viewController 的实例?)

ios - 在 URL Scheme OpenURL 之后从 AppDelegate 调用 ViewController 方法

iPhone UIViewController 进入状态栏

iphone - 从 AVAudioRecorder 播放后 AVAudioPlayer 崩溃

android - 如何通过json数据或字符串将uiimage发送到另一个设备?

ios - 我可以使用自动布局/尺寸类别来做到这一点吗?