Im creating a custom view, it contains methods like Refresh,*LayoutSubviews*, following this tutorial
I want a label to be animated growing, to it's full width and then back to 0 width. Im using this code in "refresh" method:
[UIView animateWithDuration:1.3 animations:^{
CGRect frame = CGRectMake(50, 15, 140, 20);
[labelFav setFrame:frame];
} completion:^(BOOL finished) {
//[labelFav setHidden:YES];
[UIView animateWithDuration:1.3 animations:^{
CGRect frame = CGRectMake(50, 15, 0, 20);
[labelFav setFrame:frame];
}];
}];
The code works on any other view, but since this is a Custom view by some reason the completion block is not executing. What happens is that it only does the first block. I set a breakpoint in the "completion" block and it stops there but the animation doesnt happen. I tried to setHidden the label and still it doesnt happen.
Any ideas?