티스토리 뷰
1. 작은 크기에서 크게 커지는 애니메이션
정해진 위치에서 커지는 것이라 레이아웃은 변경하지 않음

//크기를 10분의 1로 줄임
logoImageView.transform = CGAffineTransform(scaleX: 0.1, y: 0.1)
1-1) 회전하면서 원상태로 만들기
UIView.animate(withDuration: 0.5, delay: 1, options: .curveEaseIn){
self.logoImageView.transform = CGAffineTransform(rotationAngle: 180)
} completion: { _ in
self.animationEmailTextField()
}
1-2) 원상태로 크기 만들기
UIView.animate(withDuration: 0.5, delay: 1, options: .curveEaseIn){
self.logoImageView.transform = CGAffineTransform(scaleX: 1, y: 1)
} completion: { _ in
self.animationEmailTextField()
}
1-3) 스프링 효과 주기

UIView.animate(withDuration: 0.5, delay: 1, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.5) {
self.logoImageView.transform = CGAffineTransform(rotationAngle: 180)
} completion: { _ in
self.animationEmailTextField()
}'🍎 iOS > UIKit' 카테고리의 다른 글
| 구현하며 알게된 자주쓰는 UIKit 속성들 (0) | 2024.07.14 |
|---|