i am developing an iPhone app in which there is a uitableview and a when any of the rows in the table view is selected, a new viewcontroller will be loaded which shows details about the selected row in the tableview .我的问题是我需要在 tableview 和详细信息 View 中有一个导航栏,导航栏应该有后退按钮,即详细 View 上的导航栏应该有一个后退按钮到 tableview 应该有一个后退按钮到早期的 View Controller 。怎么能我以编程方式执行此操作??
最佳答案
带有 TableView 的 View Controller 应该是导航 Controller (您可以通过编程方式创建)的 Root View Controller 。然后你只需推送 (pushviewcontroller:animated:) 详细 View Controller 。
关于iphone - 将导航栏添加到 detailview 和 tableview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9902363/