我在添加 3rd 方框架后尝试构建一个项目,但是在添加框架后我无法编译该项目,我收到架构 arm64 的未定义符号:尝试在设备上编译时出错,但我可以在模拟器上编译. 我已经尝试了在 stackoverflow 上找到的所有其他解决方案。任何帮助表示赞赏!
这是我尝试过的:
我尝试过的所有解决方案都不适合我。
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_*", referenced from:
objc-class-ref in frameworkName.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud) 有人知道如何在 SwiftUI 中更改默认 DatePicker 的大小吗?我一直在尝试提供一个自定义框架来调整 DatePicker 的大小,但我看不到预期的结果。
提前致谢!
这是我尝试过的
DatePicker("", selection: $currentDate, displayedComponents: .hourAndMinute)
.labelsHidden()
.frame(width: 150, height: 80, alignment: .center)
Run Code Online (Sandbox Code Playgroud) 为什么在下找不到我的settings.xml~/.m2?
注意:我当前正在3.3.9机器上运行Apache Maven 。

我一直在尝试查找如何在 SwiftUI 中添加自定义导航栏后退按钮,但我得到了这种奇怪的行为,即默认行为仍然出现在显示自定义行为之前。有谁知道添加它的正确方法?
这是我尝试过的。
var body: some View {
NavigationView {
ZStack {
Color.background.edgesIgnoringSafeArea(.all)
NavigationLink(destination: UserDetailsView()) {
Text("Continue")
.foregroundColor(.background)
.font(.title)
.fontWeight(.semibold)
}
.frame(width: 250, height: 60, alignment: .center)
.background(Color.white)
.cornerRadius(40)
.padding(.top, 50)
}
.navigationBarTitle("", displayMode: .automatic)
.navigationBarHidden(true)
}
}
Run Code Online (Sandbox Code Playgroud)
在这里,当我使用下面的代码隐藏后退按钮时,它甚至根本没有隐藏。
.navigationBarBackButtonHidden(true)
Run Code Online (Sandbox Code Playgroud)
在详细信息屏幕中
var body: some View {
NavigationView {
VStack {
ZStack {
Rectangle()
.foregroundColor(.clear)
.background(gradient)
.edgesIgnoringSafeArea(.all)
Text("Hello")
}
}
.navigationBarItems(leading: BackButton(presentationMode: presentationMode))
}
}
Run Code Online (Sandbox Code Playgroud)
自定义后退按钮如下所示
struct BackButton: View {
var presentationMode : Binding<PresentationMode>
var body: some View {
Button(action: …Run Code Online (Sandbox Code Playgroud)