zoukankan      html  css  js  c++  java
  • IOS零碎技术整理(2)-隐藏系统Tabbar

    原理就是将tabbar移出显示区

    -(void)hideSystemTabBar:(UITabBar*) tabbarcontroller {

         [UIView beginAnimations:nil context:NULL];//动画效果,可以不用

         [UIView setAnimationDuration:0.1];

        for(UIView* view in tabbarcontroller.subviews)

        {

            if([view isKindOfClass:[UITabBarclass]])

            {

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

            }

            else

            {

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

            }

        }

         [UIView commitAnimations];

        

    }

    -(void)showSystemTabBar:(UITabBarController*) tabbarcontroller {

        //    [UIView beginAnimations:nil context:NULL];

        //    [UIView setAnimationDuration:0.5];

        for(UIView* view in tabbarcontroller.view.subviews)

        {

            NSLog(@"%@", view);

            if([view isKindOfClass:[UITabBarclass]])

            {

                [view setFrame:CGRectMake(view.frame.origin.x,WCGLOBAL_SCREEN_SIZE.height - WCTabBarHeight, view.frame.size.width, view.frame.size.height)];

            }

            else

            {

                [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width,WCGLOBAL_SCREEN_SIZE.height - WCTabBarHeight)];

            }

            

        }

        //    [UIView commitAnimations];

    }

  • 相关阅读:
    TCP/IP协议栈之QEMU
    FreeRTOS-Plus-CLI中添加一个自己的命令行
    FreeRTOS A57
    log日志库
    函数解读:ioremap / ioremap_nocache / ioremap_wc / ioremap_wt
    Makefile 使用小结
    41. 缺失的第一个正数(First Missing Positive)
    42. 接雨水(Trapping Rain Water)
    关于C++内联和静态成员函数的问题
    C++11 线程并发问题
  • 原文地址:https://www.cnblogs.com/v-jing/p/3302864.html
Copyright © 2011-2022 走看看