【发布时间】:2020-01-15 03:19:01
【问题描述】:
我正在尝试在我拥有的一段文本旁边放置一个 SF 符号,但是,我得到了错误
Argument type 'Image' does not conform to expected type '_FormatSpecifiable'
我对 Xcode 和 swift UI 还很陌生,因此我将不胜感激。
import SwiftUI
struct HaveACodeButton: View {
var body: some View {
//NavigationView {
NavigationLink(destination: CodeLoginPage()) {
VStack {
Spacer()
Text("Have a code?")
.padding()
.foregroundColor(.blue)
.font(.callout)
Text("\(Image(uiImage: UIImage(named: "arrow.right.circle")!))")
}
}
.edgesIgnoringSafeArea(.horizontal)
//}
}
}
struct HaveACodeButton_Previews: PreviewProvider {
static var previews: some View {
HaveACodeButton()
}
}
【问题讨论】:
标签: swift xcode swiftui sf-symbols