Day 36, 37, 38 of #100DaysOfSwiftUI

Start 100DaysOfSwiftUI from 2020.Mar.18th.

Day 36, 37, 38: Project 7, part one/two/three
done with X hours

New findings: followings are new findings

sheet()
always we need to describe the condition for the behavior, this would be SwiftUI way
onDelete()
animation for delete operation looks also impressive!
modifier for NavigationStack
always need to add its child.
UserDefaults
this is what we already know, and it is almost same way to use it.
It has default value. no need to care about missing data for the key. But needs to be careful for handling it.
Codable
just adding codable works well! super! note: only in the case well-known components are used.
modifier for NavigationStack
if we need to add two items in header(leading and trailing), need to specify at same time. Later specification will overwrite previous one.

Code incl. challenges
MainView

AddView

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です