How to push a view controller to another view controller

Total Post:145

Points:1019

 1044  View(s)
Ratings:
Rate this:
I am new in iPhone development, so I want to know how can I push one view controller to another view controller using animations.
I have added a Next button. whenever I click that button I am pushing one view controller to another view controller.
Please help me.
  1. Re: How to push a view controller to another view controller

    If you want to push one view to another view controller then you need to implement below code in action method of your Next button:

    UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    ImageViewController *imageViewController = (ImageViewController*)[mainstoryboard instantiateViewControllerWithIdentifier:@"ImageViewController"];

    or in short you can use above code like this:

    ImageViewController *imageViewController = [self.storyboard instantiateViewControllerViewIdentifier:@"ImageViewController"];

    I hope above code is helpful for you.

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.