objective c - iPhone: Multiple call for viewWillAppear -


in iphone app viewwillappear: gets called.

then wiewwilldisappear: gets called.

and viewwillappear: gets called again.

so reason viewwillappear: called after viewwilldisappear:?

here in case problem setting value flag in "nsuser defaults" before page loads , checking value flag on current screen appears

and resetting value flag on viewwilldisappear

during execution of viewwillappear of current page cuntrol reaches anther page , returns same page , flag resets

what should maintain flag value reset once on final viewwilldisappear?

please , suggest

thanks

many reasons. don't rely on order / number of calls viewdidload/viewwillappear/viewdidappear. it's bad idea abuse "view...disappear" clean-up/destructor method because not called in circumstances.

it safe assume viewdidappear gets called after viewwillappear.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -