Why aren't my custom classes appearing in the dropdown in Interface Builder?

后端 未结 2 1304
星月不相逢
星月不相逢 2021-01-26 11:19

I am using Interface Builder and Storyboards to build my app. I am trying to connect my source code to my UIViewController in Storyboard, but none of my classes sho

2条回答
  •  臣服心动
    2021-01-26 12:13

    It appears that your classes aren't added to the project target. Try this:

    1) Make sure your classes are added to the right target membership on the Inspectors Panel on the right:

    2) Make sure the class inherits the View Controller type:

    class CustomViewController: UIViewController
    

    3) Reload xCode and check if the class is enabled:

提交回复
热议问题