self.navigationController 为空,在MasterViewController 不同的方法里
- (void)viewDidLoad{
[super viewDidLoad];
self.navigationItem.title = @"Order List";
self.tb.enableAppend = YES;
self.tb.enableRefresh = YES;
self.tb.RADelegate = self;
self.automaticallyAdjustsScrollViewInsets = NO;
ManagerSiteTableViewController *managerSite = [ManagerSiteTableViewController sharedLeftTableViewController];
managerSite.delegate = self;
UIBarButtonItem *leftMenu = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"]
style:UIBarButtonItemStyleBordered
target:self
action:@selector(leftMenu)];
self.navigationItem.leftBarButtonItem = leftMenu;
NSLog(@"nav:%@",self.navigationController);
[self.revealSideViewController setDirectionsToShowBounce:PPRevealSideDirectionLeft];
}
-(void)leftTableViewController:(ManagerSiteTableViewController *)leftTableViewController pushViewController:(UIViewController *)pushVC{
NSLog(@"pushVC:%@",self.navigationController);
[self.navigationController pushViewController:pushVC animated:YES];
}
self.navigationController 在viewDidLoad里显示是正常的
但在下面的那个方法里就为空,这是什么原因?
朱雀小路纱魅
10 years, 4 months ago