tags:

views:

96

answers:

1

messagecontroller is nothing but object of initialize nib file.

[self.navigationController pushViewController:messageController animated:YES];

this statement executes in normal condition

this statement also works on state maintainace testing , this line executes properly but not open new view ,why?

A: 

Calling this method call does not push a new view? If this is the question you should ask yourself some questions:

  1. Is self having an UINavigationController? Make sure self is a view controller inside a navigation controller.

  2. Is messageController initialized correctly? Like this for example (if messageController is an ivar):

    messageController = [[MyViewControllerClass alloc] initWithNibName:@"MyViewControllerClassNibName" bundle:nil];
    
bddckr
ok1>my 5 th view is acontroller it has 1 UIButton when i click on UIButton bcontroller opens it work perfectlysecond type of operation 2 >now i go to 5 th controller that is acontrollernow i press home button3>now when i again click on application i directly go to acontroller as per state maintainance rule. now when i click UIButton bcontroller view not opens whythe code for pushing view on click of UIButton[self.navigationController pushViewController:bcontroller animated:YES];
what is my mistake???
Don't know. So you're restoring the navigation controller stack when the user opens the app again and pushing `bcontroller` doesn't work anymore!? Sounds like you did it right to me. The only thing I can add is that you check exactly what differences there are between the "normal" behaviour and the one you get when you "load" the previous state.
bddckr
There is no difference ,in 1st operation tlhat pushviewcontroller line executes and new view opens but in second case pushviewcontroller line executes but new view not opens.plzzzzzzzzzzzzzzzzzzz help me
Edit your question and include the code that you use to "save the state" of your navigation controller stack/hierarchy. This will maybe help to answer your question.
bddckr