missModalViewControllerAnimated 不适用于我的 TabBarController 应用程序
我见过很多人发布有关模态视图控制器及其起诉的文章,但到目前为止没有什么特别适合我的情况。
我创建了一个 TabBarController 应用程序,我想使用登录模式视图加载该应用程序(只是 UIViewController 的基本子类)。我的目标是当按下“登录”按钮时,模式视图将被关闭。
我可以加载模态视图,但是当我关闭它时,什么也没有发生。显示和关闭模态视图的调用都是从应用程序委托运行的。
如果需要的话,我稍后会发布一些代码,但在我写这篇文章时我无法访问它,但如果我刚才描述的内容有什么突出之处,请告诉我,这个问题让我发疯! !
I've seen many people post about modal view controllers and their sue but so far nothing that specifically fits my case.
I've created a TabBarController application and I wanted to load the app with a login modal view (just a basic subclass of the UIViewController). My goal is that when the 'login' button is pressed, the modal view is dismissed.
I'm able to load the modal view, but when I go to dismiss it, nothing happens. both the calls to display and dismiss the modal view are run from the app delegate.
I will post some of my code later if needed but I didn't have access to it at the time I wrote this, but if anything stands out from what I've just described please let me know, this problem is driving me crazy!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 dismissModalViewControllerAnimated 方法来关闭视图。
在 IBAction 中使用
[selfmissModalViewControllerAnimated:YES];
。You can use the dismissModalViewControllerAnimated-method to dismiss the view.
Use
[self dismissModalViewControllerAnimated:YES];
in the IBAction.