开发者

Three20 get current Navigationcontroller

I have an application calling Information from the web while a user is log开发者_如何学Goged 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.


Ok my fault, the TTNavigator reacts to visibleViewController or topViewController, too

this allows a call like:

[[[TTNavigator navigator] topViewController] isKindOfClass:[LoginView class]];

from anywhere in the Code

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜