objc-class-ref in UserSettingController.o


objc-class-ref in UserSettingController.o_第1张图片


症状:1、点击跳转到这个界面时崩溃,打断点程序会在push到下一页的命令处崩溃

           2、导致崩溃界面的文件像这样关键字不变色,整个文件都不变色 

可能会报的错误:1、Unknown class UserSettingController in Interface Builder file.

                             2、reason: '-[UIViewController setStrSubParentID:]: unrecognized selector sent to instance 0x7fd2040f60a0'

                             3、然后我调整了一下,做了个页面跳转会报如下错误

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_UserSettingController", referenced from:
      objc-class-ref in UserSettingController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
从前两个错误完全不知道怎么解决,网上的方法都行不通,我是根据第三个错误解决的


第三个错误的解决办法是,在工程的Build Phases/Compile Sources中添加报错的文件,就比如这个“UserSettingController.o”,应该添加“UserSettingController.h”、“UserSettingController.m”的文件,添加完成后文件的关键字会恢复颜色,可以编译











你可能感兴趣的:(objc-class-ref in UserSettingController.o)