我正在开发一个 iOS 应用程序,我需要将数据库的内容翻译成多语言,正如我在使用 Firestore 的应用程序中所说的那样。有没有人有办法解决吗?
我正在 SwifUI 中开发一个跨平台应用程序。在 iPhone / iPad 上,这段代码在 MacOS 上运行得非常好,相反,当我插入 NavigationLink 时,ForecastCardView 被完全切断。当我删除 NavigationLink 时,一切都会正确呈现。
带有导航链接
var FullSection: some View {
LazyVGrid(columns: homeConfigurationUI.columns, alignment: .center, spacing: 20) {
NavigationLink(destination: Text("test")) {
ForecastCardView(viewModel: ForecastCardViewModel.initForTest())
}.frame(width: 300, height: 300, alignment: .center)
}
.border(Color.yellow)
.frame(minWidth: 300, idealWidth: 400, maxWidth: 600, minHeight: 0, idealHeight: 500, maxHeight: .infinity, alignment: .center)
}
Run Code Online (Sandbox Code Playgroud)
没有导航链接
var FullSection: some View {
LazyVGrid(columns: homeConfigurationUI.columns, alignment: .center, spacing: 20) {
ForecastCardView(viewModel: ForecastCardViewModel.initForTest())
}
.border(Color.yellow)
.frame(minWidth: 300, idealWidth: 400, maxWidth: 600, minHeight: …
Run Code Online (Sandbox Code Playgroud) macos swiftui swiftui-list swiftui-navigationlink swiftui-scrollview