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

100 days of swiftUI

🔗
 楼主| julyVAHF 2022-2-25 14:18:59 来自APP | 只看该作者
全局:
Day 79: use environment object and tabview
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-2-27 14:19:43 来自APP | 只看该作者
全局:
Day 80:
@Published == willSet{ objectWillChange.send()}
Use Result for task to achieve flexibility for cancel long request/handle error,etc
Disable image interpolation by set it to .none
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-3-8 13:57:33 来自APP | 只看该作者
全局:
Day 81:
How to create context menu
How to add Custom swipe action on a row of list
How to schedule local notifications
How to add 3rd party package using swift package manager
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-3-10 13:19:08 来自APP | 只看该作者
全局:
Day 82:
Building tab bar with prospect objects (class, with @environmentObject, which only works for class).
EnvironmentObject never this accessible for all children view, so add the modifier  to parent view(tabview instead of each tabitem) if the environmentObject didn’t exist when view is created, the app crashes

Use map/filter at compute property hog a view
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-3-13 15:08:44 来自APP | 只看该作者
全局:
Day 83:
Fileprivate(set) modifier: write access only allowed at current fileThe reason we put prospect and prospects at the same file
Use objectWillchange to trigger SwiftUI update
Use code scanner to Scan qr code
Generate QR code from string -> data and covert to cgi image -> ui image
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-3-16 13:34:10 来自APP | 只看该作者
全局:
Day 84:
Save data to user default
Be aware not to dynamically regenerate image/QR code in view body-> cause endless loop for view to be regenerated the trigger update image call again-> then view regenerated… Xcode compiled show purple warning
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-3-17 15:05:41 来自APP | 只看该作者
全局:
Day 85: wrap up and challenge
Use on change/on appear to trigger view reload or objectWillChange for environment variable
Confirm dialog need to modify button not tab bar item/tab bar item group
Better use compute property
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-3-27 14:18:21 来自APP | 只看该作者
全局:
Day 86:
gestures/allowHitstesting/contentShape to define tappable area
Vibration with UInotificationFeedbackGenerator or core haptics
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-5 09:12:20 来自APP | 只看该作者
全局:
Day 87:
Use timer to trigger events(by Combine)
Environment variable scenePhase for app life cycle: active,inactive, background
Accessibility use cases: accessibility by differentiate without color
Accessibility reduce motion
Accessibility reduce transparency
回复

使用道具 举报

🔗
 楼主| julyVAHF 2022-4-5 09:16:04 来自APP | 只看该作者
全局:
Day 88:
Use offset/shadow to design a stack of cards
Order of modifier matters when dealing with rotation and offset
Additional buffer for Opaque to start taking effect (2 -xxx instead of 1)
How cardView set a callBack method for content view to call remove of cards-> child views should not call remove index at parent view and instead pass a closure by parents and execute it
回复

使用道具 举报

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

本版积分规则

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