zl程序教程

您现在的位置是:首页 >  工具

当前栏目

SwiftUI3 新API组件之 05 更紧凑的TimelineView

2023-09-11 14:18:30 时间

什么是TimelineView

更紧凑的TimelineView定义
与样式类似,SwiftUI 团队正在推动我们为新的TimelineView.

从 Xcode 13b3 开始,这会生成弃用警告:

TimelineView(EveryMinuteTimelineSchedule()) { context in
  Text(context.date.description)
}

推荐的方式是:

TimelineView(.everyMinute) { context in
  Text(context.date.description)
}

加入我们一起学习SwiftUI

QQ:3365059189
SwiftUI技术交流QQ群:518696470
教程网站:www.openswiftui.com