简体   繁体   English

如何在Xcode中的按钮内从UITableViewController更改为ViewController

[英]How to change from a UITableViewController to a ViewController within a button in Xcode

Hello I am a beginner/intermediate user at Objective-C and Xcode but I am wondering, can someone please provide a source for changing views from a UITableViewController to a ViewContoller? 您好,我是Objective-C和Xcode的初学者/中级用户,但我想知道,是否有人可以提供将视图从UITableViewController更改为ViewContoller的资源? I've tried about everything and nothing is working. 我已经尝试了一切,但没有任何效果。 I've tried calling a Segue using performseguewithidentifier but it's not working I guess cause it's a UITableViewController and not a ViewController. 我试过使用performeguewithidentifier调用Segue,但是它不起作用,我猜是因为它是UITableViewController而不是ViewController。 So if someone could help me I'd really appreciate that, thanks. 因此,如果有人可以帮助我,我将非常感谢。

Try this out : 试试看:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    //push the view controller to a navigationController
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从另一个ViewController中选择UITableViewController行? - How to select UITableViewController row from ANOTHER ViewController? 如何从另一个ViewController中的按钮更改单独的ViewController中的textView? - How to change textView in separate ViewController from button in another ViewController? 如何在 xcode 中将 UIViewController 更改为 UITableViewController - How do I Change a UIViewController to a UITableViewController in xcode 将数据从ViewController传递到UITableViewController - Passing Data from ViewController to UITableViewController 从ViewController加载一个storyboard(UITableViewController) - Load an storyboard (UITableViewController) from ViewController 如何从Modal ViewController重新加载父UITableViewController中的数据 - How to reload data in parent UITableViewController from Modal ViewController xcode:如何在ViewController中播放视频 - xcode: How to Play a video within the ViewController 无法从 ViewController Xcode 将“按钮”连接到 viewcontroller.h - Cannot connect "button" to viewcontroller.h from a ViewController Xcode xCode主从细节从主ViewController更改细节ViewController - xCode Master-Detail change detail viewcontroller from master viewcontroller 如何在 Xcode 中更改默认的 ViewController 类声明 - How to Change the Default ViewController Class Declaration in Xcode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM