現在、UItableViewのcellをタップすると画面遷移するようstoryboardを使わず、コードのみで書いています。しかし、UItableViewはSimulatorに表示されますが、画面遷移はしません。そこで、どのようにコードを記述すれば、画面遷移するようになりますか?
一応、func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) の中にNavigationControllerで遷移させるコードは書いています。
swift
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { print("Num: \(indexPath.row)") print("Value: \(myItems[indexPath.row])") let forthViewContorller = ForthViewController() self.navigationController?.pushViewController(forthViewContorller, animated: true) }
まだ回答がついていません
会員登録して回答してみよう