• 隐藏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];

         

     }

  • 相关阅读:
    day21
    day19
    【淘淘商城项目】jsonp解决ajax跨域问题
    【淘淘商城项目】商品规格参数的表结构设计
    打印日志的时机
    【javascript】call和apply的区别
    MySQL timestamp自动更新时间
    spring管理属性配置文件properties——PropertiesFactoryBean和PropertyPlaceholderConfigurer的区别
    【Maven】修改nexus默认的工作目录
    URIEncoding和UseBodyEncodingForURI的解释
  • 原文地址:https://www.cnblogs.com/zhou--fei/p/4964961.html
Copyright © 2020-2023  润新知