SwiftUI / CoreData / Master / Detail (with editing) / Xcode 11 - Beta 5

前端 未结 3 1343
故里飘歌
故里飘歌 2020-12-14 13:08

Working on a sample app. The goal is to have a list pulled up from CoreData in a Master, and then click on one to go to a detail, where you can edit the information and sav

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 14:03

    As @trapper explained, the entityName has to be bound the the MasterView.

    Updates are reflected when you add @ObservedObject in the DetailView as follows:

    @ObservedObject var entityName:EntityName
    

提交回复
热议问题