iOS App Dev Tutorials - Views - Creating a card view
Section1. Create a color theme - Step6 enum Theme: String { case bubblegum case buttercup . . . var accentColor: Color { switch self { case .bubblegum, .buttercup, .lavender, .orange, .periwinkle, .poppy, .seafoam, .sky, .tan, .teal, .yellow: return .black case .indigo, .magenta, .navy, .oxblood, .purple: return .white } } } Switch문이 사용되었다. Switch문의 기본 형태는 다음과 같다. switch 고려해야 할 값 { case 값1: 값1에 ..
더보기