UIImageView scale from center using Animation Blocks

前端 未结 3 1397
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 01:31

I am using the following to scale image up but it\'s scaling from it\'s left top point, how can I make the scale from center

[UIView animateWithDuration:duration         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 02:13

    this can be the block of animation for the scale up the image

    here as theView U Can Use the uiimageview

    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:GROW_ANIMATION_DURATION_SECONDS];
    theView.transform = CGAffineTransformMakeScale(1.2, 1.2);
    
    [UIView commitAnimations];
    

提交回复
热议问题