我有一個表格視圖。因爲我必須在單元格中添加動畫圖像。我嘗試了一些條件,但仍然不起作用。在下面的編碼中我犯了什麼錯誤。如何在uitableviewcell中添加動畫圖像
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if([ststus isEqual:@"43"])
{
NSArray *animationArray=[NSArray arrayWithObjects:
[UIImage imageNamed:@"unselect.png"],
[UIImage imageNamed:@"select.png"],
nil];
UIImageView *animationView;
animationView.animationImages=animationArray;
animationView=[[UIImageView alloc]initWithFrame:CGRectMake(130, 50,36, 36)];
animationView.animationDuration=90;
animationView.animationRepeatCount=0;
[animationView startAnimating];
cell.animation.image= animationView;
} }
最後一行有一個警告:Incompatible pointer types assigning to 'UIImage *' from 'UIImageView *'
在我的表視圖單元格動畫圖像不appearing.please任何一個可以幫助我在coding.how我能做到這一點的過程。