提问人:Bobby 提问时间:11/7/2023 最后编辑:soundflixBobby 更新时间:11/9/2023 访问量:30
我正在尝试显示来自 Firebase 的 Int 数组,但我一直收到错误,我不知道为什么
I am trying to display an array of Int from Firebase but I keep getting an error and I am not sure why
问:
List {
ForEach(0..<tables.count, id: \.self) { item in
Text("Table \(tables[tableNumber ?? 0].items): \(tables[item].items.formatted())")
}
}
我以为这段代码会显示已经从Firebase收集的数据,如这个例子,表6:汉堡。 但相反,我收到了这个错误:
实例方法“appendInterpolation(_:formatter:)”要求“[String]”继承自“NSObject”
答: 暂无答案
评论
ForEach
Identifiable