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];

         

     }

  • 相关阅读:
    css样式表中的样式覆盖顺序(转)
    1.2 明确你的 前端学习路线 和 方法
    1.1 开篇:重新理解前端
    3_1:语言基础:原始值 与 引用值
    2_5:语言基础:语句
    2_4:语言基础:操作符
    2_3:语言基础:数据类型
    2_2:语言基础:变量
    2_1:语言基础:语法
    1_2 HTML中的JavaScript
  • 原文地址:https://www.cnblogs.com/zhou--fei/p/4964961.html
Copyright © 2011-2022 走看看