小编use*_*400的帖子

Swift 3 IOS 9和IOS 10核心数据

我在我的应用程序中使用核心数据.我希望该应用程序在iOS 9中打开,但事实并非如此.我该如何解决?

在此输入图像描述 在此输入图像描述

本节给出了警告.如何让它在iOS 9和iOS 10上运行?

    lazy var persistentContainer: NSPersistentContainer = {
        /*
         The persistent container for the application. This implementation
         creates and returns a container, having loaded the store for the
         application to it. This property is optional since there are legitimate
         error conditions that could cause the creation of the store to fail.
        */
        let container = NSPersistentContainer(name: "IndirimiKovala")
        container.loadPersistentStores(completionHandler: { (storeDescription, error) in
            if let error = error as NSError? {
                // Replace this implementation with code to …
Run Code Online (Sandbox Code Playgroud)

ios swift

12
推荐指数
1
解决办法
9147
查看次数

标签 统计

ios ×1

swift ×1