楼主: julyVAHF
跳转到指定楼层
上一主题 下一主题
收起左侧

100 days of swiftUI

🔗
 楼主| julyVAHF 2022-4-6 14:24:32 来自APP | 只看该作者
全局:
Day 89:
Think again about when to use callback from child view with parent view to prevent spaghetti code
Offset and rotate modifier, order matters
Use special accessibility key to help with color/motion/ transparency needs
Timer should be aware of apps scene phrase, say when bc the app, timer shall stop
Allow hit testing has useful use case
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-11 03:55:29 来自APP | 只看该作者
全局:
Day90:
animation helps with swipe and reset back user experience
Edit card view+ Json decoder +codable review
When split each view to smaller struct a how to pass in data from parent to child/ how to call functions without making spaghetti code
- use callback/type of callback in place function
- @binding to pass in state variables
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-12 14:08:44 来自APP | 只看该作者
全局:
Day 91: challenge
Don’t update data(insert into list) while reading the list loop at for each

TextField clear button or listen to onEditChange

Always pass data from parent -> child, so if parent wants to know child view change, use binding (how to pass on binding property at previews?)

Combine is not built in with SwiftUI/2 different frameworks

回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-14 13:53:39 来自APP | 只看该作者
全局:
Day 92:
Layout neutral - how SwiftUI allocate
View between paren / child view and why’s the order of modifier matters

Use of Alignment guide and create a custom alignment guide
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-18 15:16:25 来自APP | 只看该作者
全局:
Day 93:
Position:  create a new view fill up available space to position child
and offset; no actual view geometry change, we only change the location of modified view(order matters)
Geometry reader: global/custom/local space
Global: know absolute position
Local: know relative position to the parent view
Custom: know position of the view relative to other view
Scrollview + rotation 3d effect use geometry reader

回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-22 13:43:58 来自APP | 只看该作者
全局:
Day 94: wrap up and challenge
SwiftUI has 2 built in coordinate spaces: global and local
View is always exactly the same size of body
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-23 04:45:37 来自APP | 只看该作者
全局:
Day 95:
Key points
Functional programming can imperative programming

Focus on. What we want to happen and no need to spell out how things should happen

Example of compactMap()

Result - enum of .success and . failure (no synthetic sugar as optional)

Use do/catch with result
Result has an init that accepts a throwing closure
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-27 14:24:57 来自APP | 只看该作者
全局:
Day 96:
-group and environment car of sizeClass to decide a view with HStack or Vstack

- init object with uuid<_> or not unique string during tap action with alert and sheet

-need navigation view to make a view searchable

回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-30 08:21:05 来自APP | 只看该作者
全局:
Day 97:
ReUse extension bundle to decode/encode json
Using viewBuilder to fix navigation view style to .stack
Use searchable and pass in var filter result to filter resorts in the list
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-30 08:24:39 来自APP | 只看该作者
全局:
Day 98
Implement save() with user.default
Use environment variable sizeClass to change view layout and set max allowance for dynamic type size
Binding. Alert new syntax message block
Pass in environment object favorite to different view(preview as well with .environmentObject(Favorites())
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表