Reputation: 737
I have a class: @interface MyClass :UITableViewCell
... where I declare an -(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?
Upvotes: 0
Views: 267
Reputation: 7641
You may want to use
[newViewController presentModalViewController]
or
[self.navigationController pushViewController:newViewController animated:YES]
Upvotes: 1
Reputation: 15628
just write a function for that button pressed event to load the another view.
Upvotes: 0