Home > AI > IOS > SwiftUI >

different text style in substrings

Text("2.颜色提示:")
    .foregroundColor(.black)
+ Text("绿色优秀, ")
    .foregroundColor(.green)
+ Text("黑色一般, ")
    .foregroundColor(.black)
+ Text("红色不合格;")
    .foregroundColor(.red)
Relevant tags:

Leave a Reply