• ios7 适配


    1.状态栏20px高度问题

    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) 
    {
            [application setStatusBarStyle:UIStatusBarStyleLightContent];
            self.window.clipsToBounds =YES;
            self.window.frame =  CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
            //added on 19th Sep
            self.window.bounds = CGRectMake(0, 20, self.window.frame.size.width, ScreenHeight-20);
        }

    工程Plist中设置:

    View controller-based status bar appearance = NO;

    2.部分页面不能适配的,强制写回

    [self.view setBounds:CGRectMake(0, -20, self.view.bounds.size.width, self.view.bounds.size.height)];

     3.

    if (systemVersion >= 7.0)
    {
    
          self.edgesForExtendedLayout = UIRectEdgeNone;
          self.extendedLayoutIncludesOpaqueBars = NO;
          self.modalPresentationCapturesStatusBarAppearance = NO;    
     }

    4 搜索栏隐藏在状态后面

    -(void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller {
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
            CGRect statusBarFrame =  [[UIApplication sharedApplication] statusBarFrame];
            [UIView animateWithDuration:0.25 animations:^{
                for (UIView *subview in self.view.subviews)
                    subview.transform = CGAffineTransformMakeTranslation(0, statusBarFrame.size.height);
            }];
        }
    }
    
    -(void)searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller {
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
            [UIView animateWithDuration:0.25 animations:^{
                for (UIView *subview in self.view.subviews)
                    subview.transform = CGAffineTransformIdentity;
            }];
        }
    }
  • 相关阅读:
    工单系统的设计与实现(4)
    java_tcp_简单示例
    java_udp编程
    mysql 锁问题 (相同索引键值或同一行或间隙锁的冲突)
    行锁与表锁详解
    BTree和B+Tree详解
    深入浅出java常量池
    MySQL三大范式和反范式
    java多线程 栅栏CyclicBarrier
    SpringBoot初始教程之Servlet、Filter、Listener配置
  • 原文地址:https://www.cnblogs.com/geweb/p/3397349.html
Copyright © 2020-2023  润新知