你好,歡迎來到IOS教程網

 Ios教程網 >> IOS編程開發 >> IOS開發綜合 >> iOS 隱藏tabbar

iOS 隱藏tabbar

編輯:IOS開發綜合
-(void)viewWillAppear:(BOOL)animated
{
    
    NSArray *array=self.tabBarController.view.subviews;
    
    UIView *view=array[2];
    
    view.frame=CGRectMake(0, [UIScreen mainScreen ].bounds.size.height, [UIScreen mainScreen ].bounds.size.width, 49);
    
    [UIView commitAnimations];
    
}

- (void)viewWillDisappear:(BOOL)animated
{
    
    NSArray *array=self.tabBarController.view.subviews;
    
    UIView *view=array[2];
    
    view.frame=CGRectMake(0, [UIScreen mainScreen ].bounds.size.height-49, [UIScreen mainScreen ].bounds.size.width, 49);
    
    [UIView commitAnimations];
}

 

  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved