izan
izan

Reputation: 737

UITableViewcell and an IBAction

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

Answers (2)

steipete
steipete

Reputation: 7641

You may want to use

[newViewController presentModalViewController] 

or

[self.navigationController pushViewController:newViewController animated:YES]

Upvotes: 1

Aravindhan
Aravindhan

Reputation: 15628

just write a function for that button pressed event to load the another view.

Upvotes: 0

Related Questions