美文网首页
iOS15适配相关

iOS15适配相关

作者: 吴斌 | 来源:发表于2021-11-15 14:41 被阅读0次

1、tabbar相关

UITabBarAppearance *appearance = [[UITabBarAppearance alloc] init];

//tabBaritem title选中状态颜色

appearance.stackedLayoutAppearance.selected.titleTextAttributes = @{

   NSForegroundColorAttributeName:[UIColor blueColor],

};

//tabBaritem title未选中状态颜色

appearance.stackedLayoutAppearance.normal.titleTextAttributes = @{

   NSForegroundColorAttributeName:[UIColor blueColor],

};

//tabBar背景颜色

appearance.backgroundColor = [UIColor blackColor];

self.tabBarItem.scrollEdgeAppearance = appearance;

self.tabBarItem.standardAppearance = appearance;

2、navigationBar相关

UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init];

appearance.backgroundColor = [UIColor blackColor];

self.navigationBar.standardAppearance = appearance;

self.navigationBar.scrollEdgeAppearance = appearance;

3、tableView相关

为了配合以前的开发习惯,我们只需要在创建实例的时候进行对间距的设置即可

if (@available(iOS 15.0, *)) {

    tableView.sectionHeaderTopPadding = 0;

}

或者全局设置

if (@available(iOS 15.0, *)) {

    [UITableView appearance].sectionHeaderTopPadding = 0;

}

相关文章

  • iOS15适配相关

    1、tabbar相关 UITabBarAppearance *appearance = [[UITabBarApp...

  • iOS 15 适配

    一年一系统,一年一适配。今天我们来讲一下iOS15适配的相关地方。导航栏适配iOS 15中,导航栏的问题比较明显,...

  • html2canvas在ios15系统截图空白并刷新

    随着ios15系统的出现,项目适配ios15系统兼容性。 发现html2canvas在iOS15系统中截图空白并在...

  • iOS15 适配更新总结

    本文主要分享一下 iOS15 上适配方案,仅做开发记录使用,开发过程中通过使用陆续增加。 iOS15 的适配,很重...

  • iOS开发技巧之:iOS15 适配更新总结

    本文主要分享一下 iOS15 上适配方案,仅做开发记录使用,开发过程中通过使用陆续增加。 iOS15 的适配,很重...

  • iOS15适配

    iOS15适配主要是以下几点:UINavigationController、UITabBarController、...

  • iOS15适配

    对于iOS15适配汇总以及遇到的问题 注意:以下适配内容,必须适配的会以"必须"标出 UITableView Se...

  • iOS 15 适配笔记

    前言 环境 在 升级xcode 13.0 之后,正式开始支持 iOS15,就需要做适配 iOS15了,在 xcod...

  • ios15相关适配

    一、适配导航条的两种方式 二、一些工程不得不变成 New Build System引发编译不过的解决方法:Buil...

  • 日期篇

    1. NSDateFormatter 1.1 系统适配 iOS15以下dateFormat = @"HH:mm" ...

网友评论

      本文标题:iOS15适配相关

      本文链接:https://www.haomeiwen.com/subject/kqrqtrtx.html