【发布时间】:2013-08-29 07:18:55
【问题描述】:
我的按钮中有一个 gif,但它只显示为蓝色框。
(id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
//[self setTitle:@"Register" forState:UIControlStateNormal];
[self setBackgroundColor:[UIColor whiteColor]];
[self setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
[self setImage:[UIImage imageNamed:@"Person.gif"] forState:UIControlStateNormal];//setting image on button.
}
return self;
}
图像已正确添加到 xcode。什么给了?
【问题讨论】:
-
尝试使用
UIImageView显示gif。 -
iOS 不支持 GIF 图片
-
@chris 你必须对你的问题的答案做出回应,这不是获得帮助的方式。在列表中,您回复为您提供有关您的问题的答案的用户。谢谢
标签: ios objective-c ios6 uibutton