Requirements: When the user does not log in, click on the Personal Information Tabbar button mode out landing page.
Problems encountered: Click on the Personal Information button. The view of the Personal information page is displayed first. Then the landing page is then modal.
This can actually reach the needs of users to log on. But it's so ugly as an app.
As a small white. Encountered problems in development except scratching his heads. So I scratched the head for almost 4 hours. This problem was solved.
It's easy for Nira to say. So, there is the same trouble with my little white. You can try this on my way to solve it.
The first thing to do is to use uitabbarcontrollerdelegate to implement this method in Appdelegate.
-(BOOL) Tabbarcontroller: ( Uitabbarcontroller *) Tabbarcontroller Shouldselectviewcontroller: (Uiviewcontroller; This method returns no is the hidden active VIEWC, which is the page you clicked on
In this method, judge whether the user is logged in.
The first if condition is to find the one that you clicked to try the controller. I am in the project, the tabbaritem.title of personal information is mine. So I took it to judge. The next step is to determine if the user is logged in, and if not, you need to pop up the landing page. If inside return NO; It means not to let the personal information page appear first. (In the vernacular ...). It is important to note that self is not available. So you have to use Tabbarcontroller.viewcontrols objectAtIndex:tabBarController.selectIndex so you can achieve pull.
Sorry to say that the place is not good enough. Small white one = =
Tabbar View Popup Landing page effect issue when switching to each other