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