zoukankan      html  css  js  c++  java
  • 隐藏uitabbar的代码

    隐藏uitabbar的代码:

    /**

     *  隐藏UITabbar

     *

     *  @param hidden yes隐藏

     */

     - (void)hidesTabBar:(BOOL)hidden{

        [UIView beginAnimations:nil context:NULL];

         [UIView setAnimationDuration:0];

         for (UIView *view in self.tabBarController.view.subviews) {

             if ([view isKindOfClass:[UITabBar class]]) {

                     if (hidden) {

                             [view setFrame:CGRectMake(view.frame.origin.x, [UIScreen mainScreen].bounds.size.height, view.frame.size.width , view.frame.size.height)];

           

                       }else{

                                 [view setFrame:CGRectMake(view.frame.origin.x, [UIScreen mainScreen].bounds.size.height - 49, view.frame.size.width, view.frame.size.height)];

                

                             }

                 }else{

                         if([view isKindOfClass:NSClassFromString(@"UITransitionView")]){

                                 if (hidden) {

                                        [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, [UIScreen mainScreen].bounds.size.height)];

                   

                                    }else{

                                            [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, [UIScreen mainScreen].bounds.size.height - 49 )];

                                        

                                        }

                             }

                     }

         }

         

         [UIView commitAnimations];

         

     }

  • 相关阅读:
    virtual
    微软MBS intern笔试
    Ubuntu Linux Green hand
    Coding style
    abstract
    Jquery Ajax请求标准格式
    Hashtable的简单实用
    C#中GET和POST的简单区别
    WIN7 64位机与32位机有什么区别
    一个加密解密类
  • 原文地址:https://www.cnblogs.com/zhou--fei/p/4964961.html
Copyright © 2011-2022 走看看