问题
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
VStack {
ForEach(Font.TextStyle.allCases, id: \.self) { style in
Text(self.describe(style: style)).font(.system(style)).italic()
}
}
}
func describe(style: Font.TextStyle) -> String {
var s: String = ""
print(style, terminator: "", to: &s)
return s
}
}
PlaygroundPage.current.setLiveView(ContentView())
produce
is it a bug or I missed something?
回答1:
Final answer from Apple
Resolution:Investigation complete - Works as currently designed
Have a lot of fun with Apple ...
来源:https://stackoverflow.com/questions/59640260/how-to-apply-italic-to-largetitle-font