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

         

     }

  • 相关阅读:
    安装python软件出错,解决办法
    vt100
    Navicat 字符集 排序规则设置
    linux 查看进程 ps aux | grep init
    一、网络编程-UDP传输协议及socket套接字使用
    二、飞机大战终极版-巩固面向对象设计项目的思想
    一、利用Python编写飞机大战游戏-面向对象设计思想
    八、递归编程技巧
    七、面向对象之单例设计模式
    六、面向对象之单继承、多继承、重写
  • 原文地址:https://www.cnblogs.com/zhou--fei/p/4964961.html
Copyright © 2011-2022 走看看