我是 Objective-C 的新手。
它有 TableViewCell
和 ViewController
上的 TableView
,如下图所示。
我想在单击 TableViewCell
时将 View 更改为另一个 Viewcontroller
。
但似乎不能使用 performSegueWithIdentifier
来更改 didSelectRowAtIndexPath
中的 View
而不使用 UINavigationController
,错误日志如下:
Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
当我点击 TableViewCell
时,是否有另一种方法可以将 View 更改为另一个 Viewcontroller
?
提前致谢。
最佳答案
在 Interface Builder( Storyboard)中单击以下内容:
正如调试器所说:只有当源 Controller 由 UINavigationController 的实例管理时才能使用 Push segues。'
然后您将能够推送 segues。
关于ios - 我可以在单击 TableViewCell 时将 View 更改为 ViewController 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23011214/