Click here to Skip to main content
15,886,778 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to display an items in the table but the app is saved in the core data without displayed can anyone know what the problem here because it's doesn't show that the app have any problem.


C#
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
    if segue.identifier == "edit" {
        let cell = sender as! UITableViewCell
        let indexPath = tableView.indexPathForCell(cell)
        let itemController: ViewController = segue.destinationViewController as! ViewController
        let nItem: ItemList = frc.objectAtIndexPath(indexPath!) as! ItemList
        itemController.nItem = nItem



here the code for the display the item to the new view controller.
Posted

1 solution

make fallowing changes :


1. var nItem: ItemList = frc.objectAtIndexPath(indexPath!) as! ItemList

&
2. In viewController.swift file

var nItem : ItemList = nil

That will fix
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900