ios - Difference in ViewController pushing -


i'm doing cs193p stanford course tutorials , apple ios dev tutorials, , there's difference between how push viewcontroller screen

apple this:

 uinavigationcontroller *anavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:rootviewcontroller];      self.navigationcontroller = anavigationcontroller; 

stanford suggests doing this:

navigationcontroller = [[uinavigationcontroller alloc] init]; [self.navigationcontroller pushviewcontroller:rootviewcontroller animated:no]; 

how different?

ps: btw, apple's method work , stanford 1 doesn't display , don't know why.

i think using pushviewcontroller:animated method going add controller @ top of stack of controllers (push new view controller on stack).

in second method not initializing navigationcontroller.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -