zoukankan      html  css  js  c++  java
  • iOS导航栏适配

    我们做屏幕导航栏横竖屏适配的时候,会发现top的值多少都有一点的偏移,加了背景色之后从0开始,不加背景色从64开始,解决方法
    self.extendedLayoutIncludesOpaqueBars = NO;
    self.edgesForExtendedLayout = UIRectEdgeBottom | UIRectEdgeLeft | UIRectEdgeRight;

    或者:

     self.edgesForExtendedLayout = UIRectEdgeNone;

    //设置tabbar和导航栏格式 

    self.tabBar.tintColor = [UIColor colorWithRed:254/255.0 green:202/255.0 blue:11/255.0 alpha:1];

        [[UITabBar appearance] setShadowImage:[[UIImage alloc]init]];

        [[UITabBar appearance] setBackgroundImage:[UIImage imageWithColor:[UIColor whiteColor]]];

      [[UINavigationBar appearance] setBackgroundImage:[UIImage imageWithColor:[UIColor whiteColor]] forBarMetrics:UIBarMetricsDefault];

        [[UINavigationBar appearance] setShadowImage:[UIImage imageWithColor:[UIColor whiteColor]]];

  • 相关阅读:
    Minimum Path Sum
    Unique Paths II
    Unique Paths
    Rotate List
    Permutation Sequence
    Merge Intervals
    Jump Game
    Group Anagrams
    Combination Sum II
    评分
  • 原文地址:https://www.cnblogs.com/hualuoshuijia/p/5266294.html
Copyright © 2011-2022 走看看