Q:

Navigation bar back button works only once

I have buttons that opens facebook in webview on my app's mainview after i open facebook , i click to back button on navigation bar and after that i can't open facebook again. When i click the button the app doesn't crash but it doesn't do anything either.
This is my WebView's Controller
- (void)viewDidAppear:(BOOL)animated{
NSURL  *socialUrl=[[NSURL alloc] initWithString:selectedUrl] ;
NSURLRequest *urlRequest=[NSURLRequest requestWithURL:socialUrl];
[webViewSocial loadRequest:urlRequest];
webViewSocial.scalesPageToFit  = YES;
[self.navigationController setNavigationBarHidden:NO];
[super viewDidAppear:animated];}

And this is my code in mainview:
- (IBAction)facebookTouched:(id)sender {
socialPage = [[SocialMediaViewController alloc] initWithNibName:@"SocialMediaViewController" bundle:[NSBundle mainBundle]]  ;
socialPage.selectedUrl = URL_FACEBOOK ;
socialPage.title = @"Facebook";
[self.navigationController pushViewController:socialPage animated:YES]; }

A:

OK I solved my problem. 
I deleted this part  from my MainViewController and it worked.I did not think that this part was important so i didn't write it to my question.
   (void)viewWillAppear:(BOOL)animated{
    NSMutableArray *navigationArray = [[NSMutableArray alloc] initWithArray: self.navigationController.viewControllers];
    [navigationArray removeObjectAtIndex: 0];
    self.navigationController.viewControllers = navigationArray;
    [self.view setNeedsDisplay];
    [super viewWillAppear:animated];   
    }

