ios - UIStoryboard instantiate new UIViewController object every time a segue is performed? -
i realised using storyboards uitableviewcontroller 2 static cells executing modal segue display 2 different uiviewcontrollers creating every time new instance of view controllers, each time calling initwithcoder: method (and of course viewdidload). thought same instances used , initwithcoder: called once per view controller class.
can confirm behaviour correct? not using fancy, not prepareforsegue:
is there way avoid this?
that behavior 'by design' in current version of ios (i confirmed 2 apple engineers @ wwdc '13), changed in future update. there's no way avoid know of when using storyboards. if went xib every controller manage caching instances yourself.
Comments
Post a Comment