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

后端 未结 25 1255
北荒
北荒 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:28

    You can fix this by editing the XML of your Storyboard.

    1. Right-click your My.storyboard entry in the Project Navigator panel and select the Open As->SourceCode menu choice. Find your view controller entry in the XML, and add the attribute customClass="MyController".

    2. Save the storyboard.

    3. Right-click your My.storyboard entry in the Project Navigator panel again, and select the Open As->Interface Builder - Storyboard menu choice.

    The custom class entry will now contain your MyController class name.

提交回复
热议问题