Using a loop for adding attributes to multiple UIImageViews

后端 未结 2 1761
没有蜡笔的小新
没有蜡笔的小新 2021-01-28 06:11

I have 8 UImageViews that I am adding animations to. I know I can make the animation eight times, but can I use a loop -and maybe interpolation- for it?

He

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-28 06:33

    Yup, put the images in an array and loop through the array.

    for var i = 0; i < dieImages.count; i++ {
        dieImages[i].startAnimating()
    }
    

    Does that help? A little confused about your intentions, but I think this answers your question

提交回复
热议问题