我试图通过动画顺序更新uilabel,据我所知,标签从不动画,只是从默认文本到[tweets objectAtIndex:2]
- (void) statusesReceived:(NSArray *)statuses
forRequest:(NSString *) connectionIdentifier
{
for ( NSDictionary *dict in statuses )
{
[tweets addObject:[dict objectForKey:@"text" ]];
}
tweetsLabel.text = [tweets objectAtIndex:0];
[tweetsLabel setFont: [UIFont fontWithName:@"Verdana-BoldItalic" size:42]];
[UIView animateWithDuration:5.5
animations:^{tweetsLabel.transform =CGAffineTransformIdentity;} completion:^(BOOL finished){
tweetsLabel.text = [tweets objectAtIndex:1];
[UIView animateWithDuration:5.5
animations:^{tweetsLabel.transform =CGAffineTransformIdentity;} completion:^(BOOL finished){
tweetsLabel.text = [tweets objectAtIndex:2];
}];}];
[self.tableView reloadData];
}
答案 0 :(得分:5)
你不希望同时在同一个视图上发生两个动画,它们会相互抵消,可以这么说。您需要一个能够完成所需操作的动画块。