ios - 重定向回主屏幕时,按钮不起作用且导航 Pane 不显示

标签 ios ios5

我有一个登录屏幕,成功登录后重定向到主页。

我这样重定向:

ViewController *viewController = [[UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"main"];

[self presentModalViewController:viewController animated:YES];

并且重定向发生,并且主屏幕加载,但其上的按钮不再响应点击,并且导航区域丢失。

我正在使用推送序列。

有谁知道为什么会发生这种事情?另外,现在我正在使用 push seguey,但我应该使用模态 seguey 吗?

我的功能是:在一个屏幕上执行一些逻辑,然后转到下一个屏幕。

最佳答案

首先,我会以不同的方式创建整个“重定向”。在 IB 中,选择登录 View Controller 并将其拖到主屏幕 View Controller 并选择推送。选择segue并添加标识符并将您的重定向方法替换为
[self performSegueWithIdentifier:@"IB 中设置的标识符"sender:self];

关于ios - 重定向回主屏幕时,按钮不起作用且导航 Pane 不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11744901/

相关文章:

iphone - 使用计数值对数组进行排序

ios5 - UITableViewCell 中的 UIButton 使用 Storyboard 执行对另一个 UIViewController 的 Segue

iphone - iOS 5 上的 SA_OAuthTwitterEngine Twitter 身份验证(错误 -1012)

ios - 如何在 Storyboard 中加载 xib View ?

ios - 快速将 userdefaults 类型转换为 Int()

ios5 - 在模态视图 Controller 中使用 UIAppearance 样式?

ios - 核心蓝牙 : What is the lifetime of unique UUIDs

iphone - 无法在 iphone 中使用 Sharekit 共享链接

ios - UIButton 背景图像在点击时不会改变

iphone - 使用 XMPPFramework for ios 存储消息?