我的代码中有一个按钮,并且有一个名为LogindView.swift的文件
单击按钮时,我无法获取打开另一个视图文件的代码。
谁能给我一个例子。
在我的按钮操作中,我尝试编写LogindView(),但我只是警告我。“'LogindView'初始化程序的结果未使用”
Button(action: {
// Do action
LogindView()
}, label: {
//** Label text
Text("Logind")
.font(.headline)
.padding(.all)
.foregroundColor(Color.white)
})
.background(Color.blue)
Run Code Online (Sandbox Code Playgroud)