Unknown class FirstViewController in Interface Builder file

前端 未结 9 1825
庸人自扰
庸人自扰 2020-12-06 09:52

When I run my application i got this I see in my console this message \"Unknown class FirstViewController in Interface Builder file.\"

I am running TabBar applicati

相关标签:
9条回答
  • 2020-12-06 10:43

    This happened to me just after Git merge and resolving few conflicts.
    It had screwed up my XCode project.

    I tried all over the StackOverflow. At first I thought my Custom class .m file hasn't been added to the Compile Sources class list. But it's one case, however even after adding it, it gave me same issue back.

    How I resolved:

    1. I kept a backup of my .xib file and its backing custom class .m and .h files.
    2. Then clean the project and try to run the app via XCode (which might not work)
    3. Then re-add the files back to the XCode project and it will work.

    Cheers!

    0 讨论(0)
  • 2020-12-06 10:47

    Sometimes it happens when you change target name for some reason, you have then to open storyboard as source file, then search for old target name, replace it with the new name, should work if it is the case, hope it helps.

    0 讨论(0)
  • 2020-12-06 10:49

    It is kinda hard to understand your comments, but I think you may have deleted the FirstViewController but forgot to change all the references to it. you may need to go to MainWindow.xib and look for all FirstViewController UI components and delete them

    0 讨论(0)
提交回复
热议问题