Swift UI, removing item from array, while looping in it throws Fatal Error: Index out of range

后端 未结 0 609
半阙折子戏
半阙折子戏 2020-12-17 20:07
import SwiftUI

struct Item{
    var name = "My Item"
    var price = "10$"
}



struct ContentView: View {
    @State var items:[Item] = [Item()         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题