ios - Setting `title` changes UINavigationController stack -
i've had code working fine this:
[self.navigationcontroller pushviewcontroller:subview animated:yes]; to push new view onto uinavigationcontroller stack, i've implemented functionality reloads content of view , updates title, have function this:
- (void)loadentries:(nsstring *)entriestoload {    //loading code    self.title = [entriestoload lastpathcomponent]; } this code set title fine, causes uinavigationcontroller lose main root view was. if comment code out works absolutely fine, set title when i'm push new view onto view stack , has been working fine. add strangeness if view child view of child view (root view -> child view -> child view) seems treat first child view root. i'm unsure why changing title have such impact on navigation stack.
there must confusion here. talking child view (which sub-view after being added) or child view controller? because:
[self.navigationcontroller pushviewcontroller:subview animated:yes]; is expecting uiviewcontroller's subclass , not uiview's subclass. 
if want play subviews, can simply:
[self.view addsubview:mysubview];  and change title of uinavigationcontroller.
Comments
Post a Comment