ios - Controller A jumps to controller B, and screen B goes black?
天蓬老师
天蓬老师 2017-05-31 10:33:00
0
3
749

1. There are two VCs in storyBoard, each with navigation.

2. AVC jump method to BVC, button connection method

- (IBAction)clickBtnToBvc:(id)sender { BViewController *vc = [[BViewController alloc]init]; [self.navigationController pushViewController:vc animated:YES]; }

3.BVC black screen, what is the reason?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all (3)
世界只因有你

Your B is created in the storyboard and bound to the control, so it needs to be loaded from the storyboard

BViewController * vc = [[UIStoryboard storyboardWithName:@"storyboard" bundle:nil] instantiateViewControllerWithIdentifier:@"IDENTITY"]; [self.navigationController pushViewController:vc animated:YES];
    洪涛

    Try setting a background color for the view of BViewController

      给我你的怀抱

      Delete the navigation of b

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!