OwnerModel是NSManagedObject的子级,当我删除包装器时,请求将返回所需的所有者。当我离开它时,它什么也不会返回!
struct OwnerCell: View {
@ObservedObject var owner: OwnerModel
private var cashListView: some View {
let predicate = NSPredicate(format: "owner = %@", owner)
return CashItemListView(owner: owner, request: CashItemModel.sortedFetchRequest(using: predicate))
}
var body: some View {
// view code
}
}