Start 100DaysOfSwiftUI from 2020.Mar.18th.
Day 97: Project 19, part two
done with X hours
New findings: followings are new findings
- ListFormatter would be convenint for almost all user except Japanese… I guess that description(A, B, C and D) is not so common in Japanese.
Following extension woudl become useful soon, because i want to have consistent behavior in iPhone and iPad separately.
コード
1 2 3 4 5 6 7 8 9 10 11 |
extension View { func phoneOnlyStackNavigationView() -> some View { if UIDevice.current.userInterfaceIdiom == .phone { return AnyView(self.navigationViewStyle(StackNavigationViewStyle())) } else { return AnyView(self) } } } |
Following mapping looks really cool !
コード
1 2 3 4 5 6 7 8 9 10 11 |
var size: String { switch resort.size { case 1: return "Small" case 2: return "Average" default: return "Large" } } |
Sponsor Link