16
I know a ton of people have asked the same question, but none of the proposed solutions seem relevant, so I'm asking again: I have the following block of code:
UIImageView *moneyHolder = [[UIImageView alloc] initWithImage:moneyImage];
if([paymentMethod.viewed intValue] == 0){
//CGRect targetFrame = CGRectMake(0, cell.frame.size.height/2-3, cell.frame.size.width, targetHeight);
CGRect targetFrame = moneyHolder.frame;
targetFrame.origin.y = cell.frame.size.height/2-3;
NSLog(@"animating");
[UIView animateWithDuration:2
delay:0
options: UIViewAnimationCurveEaseOut
animations:^{
moneyHolder.frame = targetFrame;
}
completion:^(BOOL finished){
NSLog(@"done");
}
];
}
Which I would THINK should animate my moneyHolder frame. Unfortunately, this seems to happen immediately rather than with a duration of 2 seconds. I can verify this with timestamps from my log:
2012-05-11 03:41:50.102 AgilePoet[5824:15203] animating
2012-05-11 03:41:50.116 AgilePoet[5824:15203] done
Does anyone have any thoughts on why this might be happening? All the other questions on the subject focused on the property not being animatable, but I know that an imageview frame is animate-able. The only thing I can think is that this code is written inside my
-tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath method.
Thanks in advance!