Tabbar View Popup Landing page effect issue when switching to each other

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.