简体   繁体   English

故事板自定义类属性未显示

[英]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.

相关问题 Xcode 自定义字体未显示在 Storyboard 中 - Xcode custom fonts not showing up in Storyboard Storyboard uiviewcontroller,“自定义类”未显示在下拉列表中 - Storyboard uiviewcontroller, 'custom class' not showing in drop down iOS:自定义UITableViewCell中的项目显示不一致。 故事板错误? - iOS: Items in custom UITableViewCell not showing up consistently. Storyboard bug? 是否可以在故​​事板上将自定义UIImagePickerController类与viewController连接起来 - Is it possible to wire up a custom UIImagePickerController class with a viewController on the storyboard 未在模拟器中创建的自定义UIView故事板类,在界面生成器中显示 - Custom UIView storyboard class not created in simulator, shows up in interface builder FooterView没有显示在Storyboard UICollectionView中 - FooterView not showing up in Storyboard UICollectionView 自定义字体未显示在新的故事板上 - Custom font are not showing in new storyboard iOS:“自定义”按钮未显示在情节提要上 - iOS: Custom button not showing on Storyboard 自定义字体未在Xamarin Storyboard中显示 - Custom Font not showing in Xamarin Storyboard 情节提要中的自定义UIView不显示子视图 - Custom UIView in storyboard not showing subviews
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM