Color("primary")
Spacer
components vs margins/css box modelHStack {...}.padding(20)
struct MyComponent: View {// a required prop named titlevar title: String}
.frame(width: 200, height: 100, alignment: .top)
xcode continuously recompiles, so when you make changes it just works.
framer motion/react-spring/etc vs swiftui animations
Attaching event handlers
@State var x = 0@Binding var showThing = Bool
HStack(spacing: 10) {Image(systemName: "gear").font(.system(size: 16, weight: .bold, design: .default)).frame(width: 16, height: 16)Text("Some Label").font(.system(size: 16, weight: .bold, design: .default))}
Color.white
, LinearGradient
, any View
.C-i
Definition:
struct FontModified: ViewModifier {func body(content: Content) -> some View {content.font(.system(.body, design: .rounded))}}
Text("Some thing here").modifier(FontModifier())