【问题标题】:Dismiss view, then show another one?关闭视图,然后显示另一个?
【发布时间】:2011-03-27 00:52:41
【问题描述】:

我有一个 iPhone 应用程序,我想在其中隐藏第一个视图,然后顺利显示第二个视图。这是我的代码:

[self dismissModalViewControllerAnimated:NO];

SettingsViewController *screentwothree = [[SettingsViewController alloc] initWithNibName:@"settingsView" bundle:nil];
screentwothree.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:screentwothree animated:NO];
[screentwothree release];
}

但是,它崩溃了,没有错误。

请帮忙!
库尔顿

PS:使用 UINavigationView 会更容易吗?如果是这样,您能否发布一些示例代码?谢谢!

【问题讨论】:

    标签: objective-c ios4 uiviewanimationtransition


    【解决方案1】:

    使用带有延迟的 performSelector 在关闭第一个视图半秒后显示第二个视图。
    它还可以让你有动画,使过渡更平滑。

    【讨论】:

      猜你喜欢
      • 2013-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-01
      • 2011-08-17
      相关资源
      最近更新 更多