构建失败错误:未定义的符号

时间:2012-04-05 08:58:35

标签: ios delegates uikit

我在尝试构建项目时收到此错误。

Undefined symbols for architecture i386:
  "_OBJC_IVAR_$_UINavigationBar.images", referenced from:
      -[UINavigationBar(CustomImage) drawRect:] in AppDelegate.o
      -[UINavigationBar(CustomImage) setImagesNames:] in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何人都可以提供帮助吗?

1 个答案:

答案 0 :(得分:0)

转到AppDelegate类并检查UINavigationBar类别的include。 您的类别要么从项目中丢失,要么是私有的。我最好的猜测是它丢失了或者你创建它时没有检查目标复选框。他们删除它并重新添加它。 将其添加回来以检查文件的活动目标时要小心。