我有一個水平表格視圖並且想要每5秒更換一次圖像。我想這樣的舊形象淡出,並在新的淡出改變淡入動畫圖像,所以我把這個方法:。當滾動水平表格視圖時淡入淡出動畫
self.slideTimer = [NSTimer scheduledTimerWithTimeInterval:5
target:self
selector:@selector(slideToNextImage)
userInfo:nil
repeats:YES];
這裏是我的slideToNextImage:
self.lastIndexPath = indexPath;
[UIView beginAnimations:@"FadeAnimations" context:nil];
[UIView setAnimationDuration:2];
self.horizontalView.alpha = 0.1f;
[self.horizontalView.tableView scrollToRowAtIndexPath:self.lastIndexPath
atScrollPosition:UITableViewScrollPositionMiddle
animated:NO];
[UIView commitAnimations];
[UIView beginAnimations:@"FadeAnimations" context:nil];
[UIView setAnimationDuration:2];
self.horizontalView.alpha = 1.0f;
[UIView commitAnimations];
隨着我的實現圖像變得太快,我看到第二個圖像滾動,沒有褪色動畫
你可以給你想要做什麼,是什麼問題,一些更多的信息? – Sebrassi
請做出一些截圖來指定你的要求。 – holex
對不起,編輯我的帖子,希望這會有所幫助 – user801255