我有一个 SF 符号.symbolRenderingMode
给它.palette
。
Button(action: {
self.currentview = "Form"
})
{
Image(systemName: "note.text.badge.plus")
.font(.system(size: 30))
.symbolRenderingMode(.palette)
.foregroundStyle(Color.blue, Color.green)
}
但上线
.symbolRenderingMode(.palette)
我收到此错误:
Value of type 'some View' has no member 'symbolRenderingMode'
和这个:
Cannot infer contextual base in reference to member 'palette'
有谁知道为什么会这样?