[英]Storyboard custom class attribute not showing up
I changed one my view from a UITableViewController
to UIViewController
. 我将视图从
UITableViewController
更改为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.
我尝试手动输入,但是xcode不接受。 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. 我试图清理我的项目并重新启动xcode。
What could have went wrong? 可能出了什么问题?
This answer helped me resolve the issue. 这个答案帮助我解决了这个问题。
https://stackoverflow.com/a/27215162/771355 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">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.