Sunday 15 January 2012

uinavigationcontroller - iOS navigation best practice for adding items -



uinavigationcontroller - iOS navigation best practice for adding items -

i cannot find reply although have implemented rather few times already, maybe wrong way.

say have app ios, has main screen, goes list, list has < (to main) , add together button. when click < back, go main that's pop() stack. no issues far.

now when click add together button, added stack well; when click on screen go list fine.

the problem is; when save new item, want go detail screen, don't want have add together screen on stack anymore while there. want < button detail item pointing list.

i know how this, best implement navigation stack?

well adding elements best practice nowadays modalviewcontroller. in way not added stack.

update

let's take examples simple apps apple provide ios, contacts app. when want add together new contact vc presented. you'll need implement "done" or "save" button dismiss modalviewcontroller , if want take user detail screen post notification or other mechanism on dismissviewcontroller method's completion block force detail page list. careful on animations if dismiss modal vc animated , force detail page animated unexpected behaviour. proposal dismiss modal vc animated , force detail page without animation.

ios uinavigationcontroller

No comments:

Post a Comment