开发者

uitabbarController view not resizing

I am having a navcontroller then in the next I am loading a tabbarControllor. I am using addsubview to add the tabbarcontrollor. Some part of my tabbar is hidden开发者_StackOverflow社区 could any one please tell me whats wrong with this.

uitabbarController view not resizing

uitabbarController view not resizing


  1. Use a TabBar Controller as your rootViewController, and set this in your APP Delegate.

    [_window addSubview:rootViewController.view];
    
  2. When your APP gets loaded, the tab bar controller comes up first, and by default - The First Tab! You should go to the view controller of your first tab, and in the viewDidLoad of that file, use a ModalViewController to use as a LoginViewController.

    LoginViewController *lvc = [[LoginViewController alloc]initWithNibName:@"LoginViewController" bundle:[NSBundle mainBundle]];
    
    [self presentModalViewController:lvc animated:NO];
    
    [lvc release];
    
  3. If you get to this stage, the Login View Controller will pop up right after you launch the app. If login is successful, you can dismiss it

    [self dismissModalViewControllerAnimated:YES];
    
  4. If you dismiss it, it will show you the rootController, which is the TabBarController, and this is the approach used by most programmers for login and stuff.


tabbarCon.view.autoresizesSubviews = YES;
tabbarCon.view.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);

or

set your parentview controller view like this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜