I'm working with swift 2.2 and xcode 7.3 . I am trying to load a table view from another tableview when a row gets clicked . In
didSelectRowAtIndexPath
of the first table View , I create an instance of the other table view class and call it using the pushViewController . But the table view doesn't get loaded and screen remains the same. My code is
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
NSLog("It did enter the didselectRowAtIndexPath")
if (indexPath.section == 0){
let enrolledView = DetailsViewController()
navigationController?.pushViewController(enrolledView, animated: true)
}
if (indexPath.section == 1){
let appcatalog = AppCatalogViewController()
navigationController?.pushViewController(appcatalog, animated: true)
}
if (indexPath.section == 2){
let support = supportViewController()
navigationController?.pushViewController(support, animated: true)
}
}
Note : "It did enter the didselectRowAtIndexPath" gets printed in the log . SO Kindly let me know if there is something that am not doing correctly .