1.storyBoard中有2个VC,分别套了导航。
2.AVC跳转BVC的方法,button连线的方法- (IBAction)clickBtnToBvc:(id)sender {
BViewController *vc = [[BViewController alloc]init];
[self.navigationController pushViewController:vc animated:YES];
}3.BVC黑屏,请问是什么原因?
2.AVC跳转BVC的方法,button连线的方法- (IBAction)clickBtnToBvc:(id)sender {
BViewController *vc = [[BViewController alloc]init];
[self.navigationController pushViewController:vc animated:YES];
}3.BVC黑屏,请问是什么原因?
UIStoryboard *mainSB = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
BViewController * vc = [mainSB instantiateViewControllerWithIdentifier:NSStringFromClass([BViewController class])];
[self.navigationController pushViewController:vc animated:TRUE]; BViewController *vc = [[BViewController alloc]init];楼主这样重新生成了一个B,没有初始化父视图的背景色,所以才会是黑屏
或者从storyboard里面加载 vc也行。