由於navigation引起viewwillappear不被呼叫

Dean發表於2015-02-03

來源:

http://www.cnblogs.com/zxtx/articles/1806127.html

.h:

<UINavigationControllerDelegate>

.m:

self.navigationController.delegate=self;

// navigationController代理函式
-(void) navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [viewController viewWillAppear:animated];
}

-(void) viewWillAppear:(BOOL)animated{

    NSLog(@"又能成功使用了。");
}

相關文章