1
votes

I have a UIView which animates its frame to full screen. It has a UIImageView as a subview which is the same size, it does resize but only at the end of the animation, it doesn't smoothly animate it's image. The Views Autoresize subviews has been set to YES; Any thoughts on this?

[UIView animateWithDuration:0.3
        delay:0 
        options:UIViewAnimationOptionAllowAnimatedContent          
        animations:^{
                      _View1.frame = fullScreenRect;
                    }
        completion:^(BOOL finished){;}];
3

3 Answers

1
votes
[UIView animateWithDuration: 1.5f
                      delay: 0.0f
                    options: 0
                 animations:^{
                     self.View.frame = CGRectMake(10, 50 + height, width, height);
                 }
                 completion:^(BOOL finished) {
                 }];

This should do it

0
votes

Animate them both in the block:

[UIView animateWithDuration:0.3
        delay:0 
        options:UIViewAnimationOptionAllowAnimatedContent          
        animations:^{
                      _View1.frame = fullScreenRect;
                       subview1.frame = fullScreenRect;
                    }
        completion:^(BOOL finished){;}];
0
votes

You must set _View1.clipsToBoud = YES;