简体   繁体   中英

Storyboard custom class attribute not showing up

I changed one my view from a UITableViewController to UIViewController . Heres what I did.

Renamed the file name and changed the class name. I then proceed to try and update the storyboard scene custom class to now point to this new class but it is not showing up on the dropdown list. I have tried manually typing it in, but xcode is not accepting it. It just reverts back to the old custom class. The weird part is that if I typed in a class that does not exist, it accepts it.

I have tried cleaning my project and restarting xcode.

What could have went wrong?

This answer helped me resolve the issue.

https://stackoverflow.com/a/27215162/771355

To fix it, open storyboard as source code and replace this line:

<viewController storyboardIdentifier="StoryboardId" id="SomeID" customClass="CustomClass"
sceneMemberID="viewController">

to this:

<viewController storyboardIdentifier="StoryboardId" id="SomeID" customClass="CustomClass"
 customModule="AppName" customModuleProvider="target" sceneMemberID="viewController">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM