Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

file viewController.swift is part of module "coreData" ignoring import

Tags:

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.     }   } 
like image 548
Mikael Weiss Avatar asked Jan 17 '17 13:01

Mikael Weiss


People also ask

Why can’t I use KVC on Swift objects?

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.

How to make the view controller the data source of Table View?

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:

How to create a list of tasks in Swift?

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.

How to add a view controller to a storyboard in Jira?

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.


1 Answers

Is your project name "CoreData" ? You can't call your project with the name of a module. Try creating another project with another name

like image 144
BoledgiDev Avatar answered Sep 21 '22 21:09

BoledgiDev