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

100 days of swiftUI

🔗
 楼主| julyVAHF 2021-9-6 10:02:27 来自APP | 只看该作者
全局:
Day 10: class
I learnt: deinit, private, different behavior of struct/class; uikit most of view are ass, data are struct; swoftUi the opposite
Additional reading: how struct implement mutating -> an inout behavior for self; all mutating in struct is create a new value, the behavior is optimized with copy on write
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-7 05:56:18 来自APP | 只看该作者
全局:
Day 11: protocol
What I learnt: protocol inheritance, protocol extension , protocol oriented programming
What I’m not quite understand: adding mutating keyword at protocol function or getting cannot use mutating number on immutable value: self is immutable error
Solution:
Implement a non- mutating version: (mutating keyword implicitly makes the instance itself - self- an inout parameter, and pass it as a first argument into the methods parameter list.
Enforce class only for the protocol
Use struct to
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-8 12:59:52 来自APP | 只看该作者
全局:
Day 12: optionals
Unwrapping, nil coalescing, implicit unwrap, optional chaining , failable initializers, type casting
Reading: optional protocol( objec annotations)
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-9 14:32:11 来自APP | 只看该作者
全局:
Day 13: review part 1
Review data type/functions/dict/switch syntax etc
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-10 22:56:58 来自APP | 只看该作者
全局:
Day 14: review part 2
Options/ struct/ class recap
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-11 14:21:20 来自APP | 只看该作者
全局:
Day 15: properties/get set compute property,polymorphism/cal/ type casting/
Reading: at protocol extension, if use self- current value but use Self means the current data type
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-13 01:49:30 来自APP | 只看该作者
全局:
Day 16: we split app overview: form/navigation view/@state
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-13 01:55:21 来自APP | 只看该作者
全局:
Day 17: form,syntax to use @state property(with$), picker, foreach
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-14 14:17:04 来自APP | 只看该作者
全局:
Day 18:
Wesplit wrap up
No more than 10 child views inside group, %f, %g meaning format
Body property is compute property in swiftUIview  
Picker/segment picker style
From can scroll
Two way binding with$
Navigation Bar title should be modifying the view inside navigation view instead of navigation view itself
For each views loop over 10 items of view
Text field always bind to strings
回复

使用道具 举报

🔗
 楼主| julyVAHF 2021-9-15 22:53:45 来自APP | 只看该作者
全局:
Day 19: challenge day - write a simple metric conversion app: temperature
回复

使用道具 举报

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

本版积分规则

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