Woke up late so didn't have as much time this morning. I learned about protocols and extensions. Protocols define requirements and extensions allow for default implementations of those requirements. Here's one useful for accessing ColorSets defined in the asset catalog:
import SwiftUI
extension Color {
public static let background: Color { Color("Background") }
public static let brand: Color { Color("Brand") }
public static let text: Color { Color("Text") }
}
Instead of typing Color("Brand")
everywhere (since it's prone to misspelling, etc.), you can do Color(Color.brand)
.
Also, spent some time playing around with Classes in Swift and inheritance. I already know about polymorphism so this was just practice with syntax.