ios - UINavigationController issue - if i return to first view, i see the color of second view -


i creating uinavigationcontroller , it's uiviewcontrollers this. first yellow color, second blue color.

then adding stack. yellow displayed while, second blue.

what's problem - if press button in top bar previous controller, don't see yellow background blue, thought title of window "one" correct.

why happening? thx

uiviewcontroller *one = [[uiviewcontroller alloc] init]; [one.view setbackgroundcolor:[uicolor yellowcolor]]; [one settitle:@"one"];   uiviewcontroller *two = [[uiviewcontroller alloc] init]; [two.view setbackgroundcolor:[uicolor bluecolor]]; [two settitle:@"two"];   uinavigationcontroller * navcontroller = [[uinavigationcontroller alloc] init]; [self.view addsubview:navcontroller.view]; [navcontroller pushviewcontroller:one animated:yes]; [navcontroller pushviewcontroller:two animated:yes]; 

i figured out what's reason.

because navcontroller relased memory.


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -