Skip to content

How can i send the table view value to another view controller when i try throw they give exception #64

@umerjahangir111

Description

@umerjahangir111
override open func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    
    
    if segue.identifier == kTaskViewControllerSegueIdentifier {
        
        let taskViewController = segue.destination as? Discountpopup
        
        if let indexPath = self.tableView.indexPathForSelectedRow{
            
            if resultSearchController.isActive && resultSearchController.searchBar.text != ""{
                let segueData : EPContact
                
                segueData = selectedContacts[indexPath.row]
                
                taskViewController?.contact = segueData
            }
            else if resultSearchController.isActive == false{
                
               
                
                let segueData : CNContact
                
                segueData = filteredContacts[indexPath.row]
                
                taskViewController?.contacts = segueData
                
                
            }
        }
        else {
            
        }
    }
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions