问题描述:

Hi I have a resetView method that resets my view too a default state and that method gets called on loadView and when the device is shaken , the two view controllers are in a tab bar controller so when I change tabs the viewWillAppear method is call and resets the view but when close the application and it go's into the background the next time it is relaunched the view wont reset I have add the reset view method call in to

-(void)viewWillAppear:(BOOL)animated;

-(void)viewDidAppear:(BOOL)animated ;

- (void)viewDidLoad;

-(void)awakeFromNib;

but none of them are being called when the application is woken from the background

网友答案:

Look at the application delegate methods. You should call any methods from when the app is started from there. If your view was the last view when you left the app, none of the methods you listed should be called. Read the documentation about when they are called.

相关阅读:
Top