Push View Controller, Black Screen

前端 未结 7 2345
旧时难觅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:02

    Typically, you transition to another view controller by calling:

    initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    

    on your custom UIViewController.

    If you're not using a xib file, then what you're doing may be fine. Are you dynamically creating your UI elements within the constructor of your ImagesViewController?

提交回复
热议问题