[英]UITableViewcell and an IBAction
我有一个类: @interface MyClass :UITableViewCell
...在这里我声明了- (IBAction)myMethod
...
在执行我的课程时,我想:
-(IBAction)myMethod:(id)sender
{
MyOtherController *cont = [MyOtherController alloc]initWithNibName:...];
我想要它,这样当我单击按钮时,我将看到我的新视图(MyOtherController的视图),请问您如何做到这一点?
您可能要使用
[newViewController presentModalViewController]
要么
[self.navigationController pushViewController:newViewController animated:YES]
只需为该按钮按下事件编写函数以加载另一个视图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.