[英]SwiftUI how to change color of a basic Text object
For SwiftUI对于 SwiftUI
.fontColor
... no longer works. .fontColor
... 不再有效。
Any thoughts on how to change the color of the text(not the background)?关于如何更改文本颜色(不是背景)的任何想法?
你可以试试:
Text("example").foregroundColor(.red)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.