我在我的按鈕中有一個gif,但它顯示爲只是藍色框。在ios中添加圖像到我的按鈕是藍色
(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圖像 – Tendulkar
@chris您必須對您的問題答案給出回覆,這不是獲取幫助的方法。 atlist你給予答覆,誰給你回答你的問題的用戶。謝謝 –