tags:

views:

12

answers:

0

Hi guys,

I am doing application using ios 4.0.I need to hide UIToolbar when I go from second view to firstview.As secondview consists UIToolbar.In secondView I am having NavigationBarButton I wrote the code as below.

-(void)back

{

[toolbar removeFromSuperview];

[self.navigationController popToRootViewControllerAnimated:YES];

}

So, I am able to hide when I am coming from firstview to secondview but the problem is when I am in secondview if I click on home button and again if run the application then its starts from secondview as i stoped there.Now, if i pop to firstview I am getting toolbar.I am not getting what's the reason and problem.

Can any one help me to solve this.Thanks in advance.