0
点赞
收藏
分享

微信扫一扫

iOS15 UI相关的适配

蒸熟的土豆 2022-07-27 阅读 92


引言

一年一度的iOS 系统 API适配来了,9 月 14 日起 App Store Connect 已经开放 iOS 15 和 iPadOS 15 App 的提交,同时苹果宣布​​自 2022 年 4 月起,所有提交至 App Store 的 iOS 和 iPadOS app 都必须使用 Xcode 13 和 iOS 15 SDK 构建。​

Xcode 13 正式版包含 iOS 15,iPadOS 15,tvOS 15,watchOS 8 以及 macOS Big Sur 11.3 SDK。​​Xcode 13 需在 macOS 11.3 及以上版本运行​​,支持 iOS 9,tvOS 9,watchOS 2 及以上系统设备调试;

也正式支持了 Vim。

II TableView 适配

sectionHeaderTopPadding


/// Padding above each section header. The default value is UITableViewAutomaticDimension.
///每个节标题上方的填充。默认值为UITableViewAutomaticDimension。
@property (nonatomic, getter=isPrefetchingEnabled) BOOL

iOS 15中 UITableView 新增了一个属性:sectionHeaderTopPadding。此属性会给每一个 section header 增加一个默认高度,当我们使用 UITableViewStylePlain 初始化UITableView 的时候,系统默认给 section header 增高了22像素,形成一个section之间的间距。

//在创建实例的时候进行section间距的设置

if (@available(iOS 15.0, *)) {
tableView.sectionHeaderTopPadding = 0;
}

//全局设置

if (@available(iOS 15.0, *)) {
[UITableView appearance].sectionHeaderTopPadding = 0;
}

II 导航条主题: 背景颜色、标题颜色


举报

相关推荐

0 条评论