【问题标题】:How to remove a view in appdelegate method?如何在 appdelegate 方法中删除视图?
【发布时间】:2013-02-05 09:52:56
【问题描述】:

我想在 appdelegate.m 中删除一个 viewcontroller 的视图,在这个方法中 - (void) GetUserCompleted 我想删除一个视图..请帮帮我

下面是FB委托方法,在dis方法中我想删除包含loginwithFB按钮的视图,

appdelegate.m

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

【问题讨论】:

    标签: iphone ios facebook view appdelegate


    【解决方案1】:

    你应该使用类似的东西:

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

    【讨论】:

      猜你喜欢
      • 2021-11-05
      • 2023-04-10
      • 2021-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多