开发者

Executing codes in viewDidLoad

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜