Push View Controller, Black Screen

前端 未结 7 2354
旧时难觅i
旧时难觅i 2020-12-14 08:55

I\'m pushing to a new view controller and passing some data to it. When I run the application I can press the button and push to a new view but the screen is completely blac

7条回答
  •  一个人的身影
    2020-12-14 09:08

    I was trying without using storyboard, and its just that the default screen it uses is in black color. I changed the background color to white and it worked.

    Pushed the controller this way-

    NextController *nextController = [[NextController alloc]init]; [self.navigationController pushViewController:nextController animated:YES];

    In NextController-

    (void)viewDidLoad{
    [self.view setBackgroundColor:[UIColor whiteColor]];
    

    }

提交回复
热议问题