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