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

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -