一
SwiftUI与Swift的区别 - 掘金 (juejin.cn) 80%
二
学习笔记如下:
目录:
1 视频 Learn SwiftUI online for FREE Bootcamp #0_哔哩哔哩
2 github代码地址:SwiftUI Bootcamp的完整源代码
3 本地代码地址:代码在本地仓库BDSwift中的SwiftUI-Bootcamp-main文件
SwiftUI与Swift的区别 - 掘金 (juejin.cn)
1 官网
2 SwiftGG
3 GitHub 汉化库
swiftUI基本知识点总结 - 掘金 (juejin.cn)
SwiftUI 概述 - Xcode - Apple 开发者
SwiftUI Tutorials | Apple Developer Documentation
换做 SwiftUI 之后,上述的很多变量就被系统接管了。开发者要做的就是直观的告诉系统放置一个图像,上面加一行文字,右边加一个按钮。系统会根据屏幕大小、方向等自动渲染这个界面,开发者也不再需要像素级的进行计算。这被称为声明式 (declarative) 编程。
备注:1中的视频目录如下:
0.Learn SwiftUI online for FREE Bootcamp 在线免费学习SwiftUI训练营
1.How to use Xcode in SwiftUI project Bootcamp 如何在SwiftUI项目训练营中使用Xcode
2.Adding Text 添加文本
3.Creating Shapes 创建形状
4.Color, UIColor, Color Literals, and Hex Colors 颜色、UIColor、颜色文字和十六进制颜色
5.Linear, Radial, and Angular Gradients 线性、径向和角度梯度
6.System Icons, Multi-Color Icons, and SF Symbols 系统图标、多色图标和SF符号
7.Adding images to a SwiftUI application Bootcamp 将图像添加到SwiftUI应用程序训练营
8.Frames and Alignments 框架和路线
9.Backgrounds and Overlays 背景和覆盖层
10.VStack, HStack, and ZStack VStack、HStack和ZStack
11.Adding Padding in SwiftUI View Bootcamp 在SwiftUI View训练营中添加填充
12.How to use Spacer 如何使用垫片
13.How to use inits and enums 如何使用inits和enums
14.How to use ForEach loops 如何使用ForEach循环
15.Implementing a ScrollView 实现滚动视图
16.LazyVGrid, LazyHGrid, and GridItems LazyVGrid、LazyHGrid和GridItems
17.How to use and ignore the Safe Area 如何使用和忽略安全区域
18.How to add Buttons to SwiftUI application Bootcamp 如何将按钮添加到SwiftUI应用程序训练营
19.How to use @State property wrapper 如何使用@State属性包装器
20.Extracting functions and subviews 提取函数和子视图
21.How to Extract Subviews 如何提取子视图
22.How to use @Binding property wrapper 如何使用@Binding属性包装器
23.How to use if-else and conditional statements 如何使用if-else和条件语句
24.How to use Ternary Operators 如何使用三元运算符
25.Adding Animations 添加动画
26.Animation Curves and Animation Timing 动画曲线和动画计时
27.How to use Transition 如何使用过渡
28.Display pop-up Sheets and FullScreenCovers 显示弹出表单和全屏封面
29.Using Sheets, Transitions, and Offsets to create a popover 使用图纸、过渡和偏移创建popover
30.How to use NavigationView and NavigationLink 如何使用NavigationView和NavigationLink
31.Add, edit, move, and delete items in a List 添加、编辑、移动和删除列表中的项目
32.How to show Alerts in SwiftUI app Bootcamp 如何在SwiftUI应用程序训练营中显示警报
33.How to make a reusable ActionSheet 如何制作可重复使用的ActionSheet
34.How to use ContextMenu in SwifUI Bootcamp 如何在SwifUI训练营中使用ContextMenu
35.How to use TextField 如何使用文本字段
36.How to use TextEditor 如何使用TextEditor
37.How to use a Toggle to create a Switch 如何使用Toggle创建交换机
38.Picker and PickerStyles 选取器和选取器样式
39.How to use ColorPicker 如何使用ColorPicker
40.How to use DatePicker to select dates 如何使用DatePicker选择日期
41.Create a Stepper 创建步进器
42.How to use Slider 如何使用Slider
43.Create a tab bar with TabView and PageTabViewStyle 使用TabView和PageTabViewStyle创建选项卡栏
44.Adapt for Dark Mode in SwiftUI project Bootcamp 适应SwiftUI项目训练营中的黑暗模式
45.Adding markups and documentation to Swift in Xcode Bootcamp 在Xcode训练营中为Swift添加标记和文档
46.How to use onAppear and onDisappear 如何使用onAppear和onDisappear
47.How to safely unwrap optionals in Swift with if-let 如何安全地打开Swift中的选项iflet
48.How to add a Tap Gesture 如何添加敲击手势
49.How to create custom models 如何创建自定义模型
50.How to use @ObservableObject and @StateObject 如何使用@ObservableObject和@StateObject
51.How to use @EnvironmentObject 如何使用@EnvironmentObject
52.How to use @AppStorage 如何使用@AppStorage
53.Manage user onboarding with @AppStorage and Transitions 使用@AppStorage和Transitions管理用户登录
54.Async Image in iOS 15 for SwiftUI Bootcamp iOS 15中SwiftUI训练营的异步映像
55.System Materials and Backgrounds in iOS 15 iOS 15中的系统材料和背景
56.How to select text with TextSelection 如何使用文本选择选择文本
57.Button styles, border shapes, and control sizes 按钮样式、边框形状和控件大小
58.Add custom List Swipe Actions 添加自定义列表滑动操作
59.How to add Badges to SwiftUI TabView and List in iOS 15 Bootcamp 如何将徽章添加到iOS 15训练营中的SwiftUI选项卡查看和列表
60.How to use @FocusState 如何使用@FocusState
61.Customizing Keyboard submit button 自定义键盘提交按钮
随手笔记:
ModelBootcamp:模型处理和系统图片获取
IfLetGuardBootcamp:guard逻辑处理
ViewModelBootcamp :数据处理
image.png
EnvironmentViewModel(EnvironmentObject):多屏幕间共享数据,不需要页面间传值
AppStorageBootcamp:数据存储 Text(currentUserName ?? "Add Name Here") 注释:currentUserName不存在时,设置默认值为“Add Name Here”
AppStorageBootcamp:本地存储,不需要在设置和获取了,直接设置属性就行
IntroView:注册页面逻辑
AsyncImageBoocamp:异步下载图片 洛雷姆·皮克苏姆 (picsum.photos)
BackgroundMaterialsBootcamp:背景图片,毛玻璃效果
ListSwipeActionsBootcamp:cell的侧滑和互动删除等
SubmitTextFieldBootcamp:自定义键盘
网友评论