Executing codes in viewDidLoad

Posted by iSharreth on Stack Overflow See other posts from Stack Overflow or by iSharreth
Published on 2010-03-29T05:42:41Z Indexed on 2010/03/29 5:43 UTC
Read the original article Hit count: 382

In my .m file :

  • (void)viewDidLoad { [super viewDidLoad];

/* Some codes for picker view and slider */

}

I used a button to navigate to second view by using the below code:

  • (IBAction)goToPlay{ [self presentModalViewController: secondViewController animated: YES]; }

I used another button to go back to first view by using below code:

  • (IBAction)goBack{ [self dismissModalViewControllerAnimated:YES]; } Now the viewDidLoad method is not calling. I had written some codes in viewDidLoad in first view and I want to execute it when pressing goBack button in second view.

What should I do?

Anyone please help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk