SwiftUI
橙子的科研日记
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SwiftUI学习之路:View修饰符-preferredColorScheme
preferredColorScheme 设置当前Color Scheme偏好。 声明方式 func preferredColorScheme(_ colorScheme: ColorScheme?) -> some View 参数 colorScheme是一种enum(枚举)类型,包含两个cases:dark light对应于系统的深色模式和浅色模式。 VStack { Button(action: {}) { Text(" Button") }原创 2021-12-14 10:21:46 · 2352 阅读 · 0 评论 -
SwiftUI学习之路:View的修饰符-foregroundStyle
foregroundStyle 设置一个View的前景样式 声明方式: func foregroundStyle<S>(_ style: S) -> some View where S : ShapeStyle func foregroundStyle<S1, S2>(_ primary: S1, _ secondary: S2) -> some View where S1 : ShapeStyle, S2 : ShapeStyle func foreground原创 2021-12-12 21:22:10 · 2458 阅读 · 0 评论
分享