Quick use of undeclared type

I am currently trying to write a small iOS application in swift where I have the following classes:   masterTableViewController addViewControllerand deleteViewController, each of them is associated with a, as already mentioned, viewController. The TableViewController wizard must send some data using a predefined function:

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {

  if(segue.identifier == "showDetails") {
    var selectedIndexPath:NSIndexPath = self.tableView.indexPathForSelectedRow()!

    var deleteViewController:deleteViewController = segue!.destinationViewController as deleteViewController

    deleteViewController.todoData = todoItems.objectAtIndex(selectedIndexPath.row) as NSDictionary
}

I want to send the data of the current row to the next one, according to the specified segue controller.

Here I get an error indicating that deleteViewController is not a type that can be assigned to a variable.

But I do not quite understand what the problem is now. Basically, this should work because I just want to create a new object of the type that my class belongs to and pass it to this controller.

, .

+4
4

. : MasterTableViewController, AddViewController, DeleteViewController

, , :

var dvc:deleteViewController = segue!.destinationViewController as deleteViewController
dvc.todoData = ...

,

+6

, " ": ( DeleteViewController) , , "" "". Xcode MIGHT , , " " "" , . , , . Xcode , , .

+2

, , , , , , - .

Google admob sdk.

, :

  • " GoogleMobileAds" .
  • CocoaPods, .
  • , . , , .
  • , , .
  • , .
  • , "-" (my_base_dir/my_project_dir/Pods/ Google-Mobile-Ads-SDK/Frameworks). , "_", Xcode " ".

, , Xcode .

0

, , , unit test, , , .

, , .

Open the right pane and check the Target Membership settings . They must be consistent for both classes.

0
source

All Articles