SwiftUI best practices: should View have a constant to singletons and should they be passed in the Environment?

前端 未结 0 648
攒了一身酷
攒了一身酷 2020-12-06 17:04

In Xcode 12 template for a SwiftUI project using Core Data, Apple provides the following code:

import SwiftUI

@main
struct CoreDataApp: App {
    let persist         


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