2016-02-21 64 views

回答

1

可以使用UITableView代表這樣的:

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 

    // row 1 corresponds to the second cell. 
    if indexPath.row == 1 { 
     performSegueWithIdentifier("MySegueID", sender: self) 
    } 
} 

在情節串連圖板,從所述第一視圖控制器創建SEGUE(而不是從細胞本身)向第二視圖控制器,以及它的標識符設置爲MySegueID``。

相關問題