1
我的应用程序内有以下代码,但它不会动画UIImageView,谁能告诉我为什么?UIImageView不动画
UITableViewCell* cell = [selectedTable cellForRowAtIndexPath:selectedPath];
NSArray* myImageArray = [NSArray arrayWithObjects:
[UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"boxBeingChecked117x11" ofType:@"png"]],
[UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"boxBeingChecked217x11" ofType:@"png"]],
[UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"boxBeingChecked317x11" ofType:@"png"]],
[UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"boxBeingChecked417x11" ofType:@"png"]],
[UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"boxBeingChecked517x11" ofType:@"png"]],
[UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"boxBeingChecked617x11" ofType:@"png"]],
nil];
cell.imageView.animationImages = myImageArray;
cell.imageView.animationDuration = 4.20;
cell.imageView.animationRepeatCount = 1;
[cell.imageView startAnimating];
[NSTimer scheduledTimerWithTimeInterval:4.0
target:self
selector:@selector(methodToInvokeAfterAnimationIsDone)
userInfo:nil
repeats:NO];
@ user698952 - 欢迎使用StackOverflow!请考虑更改您的用户名,以便其他用户将您识别为有贡献的社区成员。另外,请记住在问题和答案中正确地制定句子。拼写和语法计数! :-) – Moshe 2011-04-12 03:49:03