iOS/코드조각

[iOS, Swift] ImageView 애니메이션 구현하기

검은참깨두유vm 2022. 8. 21. 11:51
반응형

iOS 15.5, Xcode 13.31, Swift 5, UIKit 환경에서 진행했습니다.

 

imageView.animationImages = [
    UIImage(named: "image1")!,
    UIImage(named: "image2")!,
    UIImage(named: "image3")!,
    UIImage(named: "image4")!,
    UIImage(named: "image5")!,
    UIImage(named: "image6")!
]
imageView.animationDuration = 0.3
imageView.animationRepeatCount = 1

 

반응형