owen gerig
owen gerig

Reputation: 6172

animation block not working

im trying to update a uilabel sequentially via animation and as far as i can tell the label never animates it just goes from its default text to [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];
}

Upvotes: 0

Views: 357

Answers (1)

hundreth
hundreth

Reputation: 841

You don't want two animations happening on the same view at once, they will cancel each other out so to speak. You want one animation block that does everything you need.

Upvotes: 5

Related Questions