1, 在使用下拉刷新类库EGORefreshTableHeaderView的时候,将资源文件添加到工程中,但是忘记假如QuartzCore.framework框架,造成编译错误:
Undefined symbols for architecture i386:
"_CATransform3DMakeRotation", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView-6F75314CE1079327.o
"_OBJC_CLASS_$_CALayer", referenced from:
objc-class-ref in EGORefreshTableHeaderView-6F75314CE1079327.o
"_OBJC_CLASS_$_CATransaction", referenced from:
objc-class-ref in EGORefreshTableHeaderView-6F75314CE1079327.o
"_CATransform3DIdentity", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView-6F75314CE1079327.o
"_kCAGravityResizeAspect", referenced from:
-[EGORefreshTableHeaderView initWithFrame:arrowImageName:textColor:] in EGORefreshTableHeaderView-6F75314CE1079327.o
"_kCATransactionDisableActions", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView-6F75314CE1079327.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2,框架已经引入还出现编译失败:
在项目中引入EGORefreshTableHeaderView
的时候,编译出错:
Undefined symbols for architecture i386:
“_OBJC_CLASS_$_EGORefreshTableHeaderView”, referenced from:
objc-class-ref in MyMenuViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
开始以为是缺少库,排查一遍,未发现问题。后来在stackoverflow上查到原因是引入的时候xcode未把
EGORefreshTableHeaderView.m加入到target->build phase->compile sources,手动添加即可