2013-02-20 50 views
1

我想在appdelegate.m刪除一個視圖控制器的看法,這種方法內 - (無效)GetUserCompleted我想刪除一個view..pleas幫助我如何刪除appdelegate方法中的視圖?

以下

是FB的委託方法,在DIS方法,我想除去含loginwithFB按鈕的觀點,

appdelegate.m

- (void) GetUserCompleted 
{ 
    NSLog(@" %@",fbUserName); 
    NSLog(@" %@",fbmailId); 
    NSLog(@" %@",fblocation); 
    NSLog(@" %@",fbhomeTown); 
    NSLog(@" %@",fbgender); 
} 

回答

0

你應該使用類似:

NSMutableArray *allViewControllers = [NSMutableArray arrayWithArray: self.navigationController.viewControllers]; 
    for (id object in allViewControllers) { 
     if ([object isKindOfClass:[FacebookClassNameToremove class]]) { 
      [allViewControllers removeObject:object]; 
     } 
    } 
    self.navigationController.viewControllers = allViewControllers;