2015-11-24 28 views

回答

0

你應該實現

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 
       self.performSegueWithIdentifier("yourIdentifierHereFromStoryboard", sender: yourSender or nil) } 
0

在PatientDetailTableViewController,可以實現的tableview委託的FUNC:

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 
    let collectionView = self.storyboard!.instantiateViewControllerWithIdentifier("CollectionViewController") as! CollectionViewController 
    self.navigationController?.pushViewController(collectionView, animated: true) 
} 

和故事板,記住填補故事板ID:「CollectionViewController」

相關問題