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: secon开发者_Go百科dViewController 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.
Write it in
- (void)viewWillAppear:(BOOL)animated
{
}
method, this would be called every time your view will appear...
精彩评论