IPhone simulator shows black screen when customizing UIViewController custom class

When creating one view app in Xcode and dragging UIButton

, for example, a button appears when launching the app in the iPhone simulator. However, by creating a new class UIViewController

and setting that only a black screen is shown as a custom view controller class in the storyboard file in iPhone Simulator.

What have I done wrong?

+3


source to share


1 answer


I'm pretty sure the Xcode template included a loadView method in your controller class. You need to remove this as you are only overriding this method when creating the interface through code.



+5


source







All Articles