使用+号,直接插入,将Image当成Text初始化值
1.示例
Text("Hello ") + Text(Image(systemName: "star")) + Text(" World!")
2.示例
(Text("Hello ") + Text(Image(systemName: "star")) + Text(" World!"))
.foregroundColor(.blue)
.font(.largeTitle)
3.示例
Text("Goodbye ") + Text(Image(systemName: "star")) + Text(" World!")
.foregroundColor(.blue)
.font(.largeTitle)