Change title style using a font modifier:
Code:
struct ContentView: View {
var body: some View {
Label("Location", systemImage: "pin")
.font(.title)
}
}
Output:
Tip: You can also customise your font using
Code: Use the following line after initialising the label.
.font(.system(size: 20.0))
There are many way to customise all aspects of the label by splitting the text and the image as follows:
Code:
struct ContentView: View {
var body: some View {
Label {
Text("Location")
.foregroundColor(Color.blue)
} icon: {
Image(systemName: "pin")
.foregroundColor(Color.red)
}
}
}
Output: