【发布时间】:2012-07-19 07:51:41
【问题描述】:
我有一个 UIButton,它是一个徽标。此徽标按钮将永远发光,但在触摸时会停止发光。它就像一个发光的动画。
有什么建议吗?
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CABasicAnimation", referenced from:
objc-class-ref in UIView+Glow.o
"_OBJC_CLASS_$_CAMediaTimingFunction", referenced from:
objc-class-ref in UIView+Glow.o
"_kCAMediaTimingFunctionEaseInEaseOut", referenced from:
-[UIView(Glow) startGlowing] in UIView+Glow.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
【问题讨论】:
-
您说的是带有标签(文本)的按钮还是自定义图形按钮?
-
哎呀,我在下面为带有标签的按钮写了答案。您可以尝试类似的方法(使用 button.imageView.layer) - 您必须稍微调整阴影颜色。或者简单地使用两张图片(一张有发光,一张没有)以获得更多自定义效果。
标签: ios xcode quartz-graphics