Storyboard uiviewcontroller, 'custom class' not showing in drop down

后端 未结 25 1204
北荒
北荒 2020-12-08 01:34

I have a UIViewController I created in my apps storyboard, as well as a custom UIViewController subclass which I added to the project (and is correctly in the compile phase

25条回答
  •  伪装坚强ぢ
    2020-12-08 02:10

    In Xcode 8, a few of my classes had the wrong path (case sensitive) specified for their file locations.

    MyProject/mysubdirectory/MyViewController.xib (.m, .h)
    

    vs:

    MyProject/MySubdirectory/MyViewController.xib (.m, .h)
    

    Really not sure how it ended up in that state, but my project exhibited the exact same behavior as above (no outlets/actions displaying in IB), and fixing that path fixed the problem.

    I fixed this two different ways. One way was by I opened the .pbxproj file and fixing the case sensitive issue manually. The other way that worked was by tapping the folder icon under the Identity and Type section of the File Inspector tab of the file, and re-selecting the file there.

提交回复
热议问题