objective c - use applicationDidBecomeActive to call viewDidLoad -
i want make sure initializations views , stuff handled every time application starts, when called after being sent background, such multitasking.
what's best way this? should use applicationdidbecomeactive call viewdidload on viewcontroller directly? i'm guessing not wise. want make sure stuff gets done on load every time user calls app, no matter state in @ time.
i have several apps published - call viewdidload
on 1 or several uiviewcontrollers applicationdidbecomeactive
.
it works fine. apple doesn't object either.
however, aware if have allocations in viewdidload need either check allocated instances or release instances allocate in viewdidload
when app suspends. same goes db connections need closed, notification listeners, , on.
as long watch these elements , handle them correctly, approach valid , usable.
Comments
Post a Comment