简体   繁体   中英

Rotate animation with scale Image

I want to rotate an image while its size is growing, every thing should be animation. Please help me to get out of this problem.

This will scale your image to double size and rotate it 90 degrees, in 5 seconds:

[UIView animateWithDuration:5.0f animations:^{
    CGAffineTransform transform = CGAffineTransformMakeScale(2.0f, 2.0f);
    transform = CGAffineTransformRotate(transform, (CGFloat)(M_PI / 2.0f));

    myImageView.transform = transform;
}];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM