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

         

     }

  • 相关阅读:
    递归
    正则表达式的理解
    JSP九大置对象
    Cookie的使用
    sql语句按照时间段查询
    文件拷贝 上传下载 输入流输出流个人小结,仅供自己使用
    动态SQL 与sql片段 foreach
    ResultMap
    hibernate
    idea
  • 原文地址:https://www.cnblogs.com/zhou--fei/p/4964961.html
Copyright © 2011-2022 走看看