iphone - How to render viewcontroller in this way using navigation controller -
i have 3 view stacks namely myhomeviewcontroller, mysubviewcontroller, myreplylistviewcontroller.
now myhomeviewcontroller root view. , when give mysubviewcontroller takes me myhomeviewcontroller.as , when give myreplylistviewcontroller takes me mysubviewcontroller using navigation controller
so, myhomeviewcontroller -> mysubviewcontroller -> myreplylistviewcontroller
now want , when user received new mail in app.
when user launching app , if has received new reply, want show myreplylistviewcontroller first, there when give has take me mysubviewcontroller. there when give has take me myhomeviewcontroller
myreplylistviewcontroller -> mysubviewcontroller -> myhomeviewcontroller
this has happen once when has received new reply.otherwise has behave asusaul.
i trying accomplish no luck
thanks time , support.
try using uinaviationcontroller viewcontrollers property , setviewcontrollers method,
@property(nonatomic, copy) nsarray *viewcontrollers; - (void)setviewcontrollers:(nsarray *)viewcontrollers animated:(bool)animated; updated:
for below controllers.
myreplylistviewcontroller -> mysubviewcontroller -> myhomeviewcontroller you need create , array of viewcontrollers in reverse order shown above.
nsarray* mycontrollerarray = [nsarray arraywithobjects:rootviewcontroller, subviewcontroller, replyviewcontroller, nil]; set new stack of navigation.
[mynavigationcontroller setviewcontrollers:mycontrollerarray animated:no]; now go directly myreplylistviewcontroller.
[mynavigationcontroller poptoviewcontroller:replyviewcontroller animated:yes]
Comments
Post a Comment