Unknown class info in Interface Builder file

2019-06-16 02:10发布

like in the title i got a crazy massage and i cannot handle with it

Unknown class info in Interface Builder file.

Every time I run my Project some crazy bugs will appear or some bars disappear. Did anyone know what to do?

9条回答
2楼-- · 2019-06-16 02:42

The warning may be because you have assigned a removed/deleted custom class name for one of the UIView subclass. In order to fix such scenarios,

Open interface builder class as Source Code by right clicking on it (Open As -> Source Code).
Find your unknown class name in the source file. And handle accordingly.

It worked for me.

查看更多
Bombasti
3楼-- · 2019-06-16 02:45

I tend to see these types of errors when you change the name of your view and view controller classes after customizing a view or controller in Interface Builder to that class. I'd go through your views and controllers in your nib or storyboard to see if your custom classes still exist and match accordingly.

You'll run into issues with IB files when you rename or delete the underlying code without updating the IB file. A similar issue occurs when deleting or changing the name of IBOutlets after linking them to an object in Interface Builder. You'll still have the reference in Interface Builder unless you delete it explicitly.

Lastly, you can look at the IB file as a text file. It's an xml document, where you'll see all the class references. You can see if there are any classes there that may not exist in your project anymore.

查看更多
地球回转人心会变
4楼-- · 2019-06-16 02:45

This also happens if you deleted ClassName.m from Build Phases/Compile Sources

查看更多
登录 后发表回答