I tried to import CoreData and it came up with a warning "file viewController.swift is part of module "coreData" ignoring import" A Screen Shot
import UIKit import CoreData class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
You can’t access properties using KVC on a Swift object that doesn’t descend from NSObject . This takes the text in the text field and passes it over to a new method named save (name:). Xcode complains because save (name:) doesn’t exist yet.
But first, you need to make the view controller the table view’s data source. In the canvas, Ctrl-drag from the table view to the yellow view controller icon above the navigation bar, as shown below, and click on dataSource:
Enter Product Name, Language as Swift and select “ Use Core Data ” for the new Project. Delete ViewController.swift and Add new view controller which will be used for displaying the list of tasks. Enter name of the file as TaskManagerViewController with Subclass as UITableViewController and Language as Swift.
Drag and drop the button bar item to the navigation bar. In the attributes inspector, set the identifier for button bar item as Add. Also enter title as “Task Manager” in the navigation bar. Now to enter task detail, let us add new View Controller. From the Objects library, drag and drop View Controller on to storyboard.
Is your project name "CoreData" ? You can't call your project with the name of a module. Try creating another project with another name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With