Three20获取当前Navigationcontroller
我有一个应用程序在用户登录时从网络调用信息。
如果会话过期,应用程序委托将创建一个带有密码字段的快速 UIAlertView,以便用户可以立即登录。
现在的问题是:如果用户已经在真正的登录页面,我不想向他显示 UIAlertView,因为这只会让人困惑。
但是,如何在应用程序委托中找出当前可见的视图控制器是否是登录视图? 如果我有权访问顶部导航控制器,我可以调用当前可见的视图控制器是否属于登录控制器类。 但是我如何访问导航控制器?我使用的是 Three20 框架,因此应用程序委托没有对导航控制器的引用。
I have an application calling Information from the web while a user is logged in.
In case the session expired, the application delegate creates a quick UIAlertView with a password field so the user can login right away.
Now the problem is: In case the user is already at the real login-page, i don't want to show him the UIAlertView because that would be only confusing.
But how do I find out within the Application delegate, if the currently visible view controller is the login-View?
If i had access to the top Navigation-Controller I could just call whether the currently visible view controller is of the login-controller class.
But how would i get access to the navigation-controller? I'm using the three20 framework and thus the app delegate doesn't have a reference to a navigation-controller.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我的错,TTNavigator 对visibleViewController 或topViewController 做出反应,
这也允许像这样的调用:
从代码中的任何地方
Ok my fault, the TTNavigator reacts to visibleViewController or topViewController, too
this allows a call like:
from anywhere in the Code