I try to use view transition for multiple element but get this mistake: Static member 'transition' cannot be used on instance of type 'UIView'. I've read similar discussions but couldn't implement them for my case. Could you help me?
Here is my code:
func flip03() {
for item in aGameObjects {
if positionCounter == 0 {
item.transition(from: backImageView, to: frontImageView, duration: 1, options: .transitionFlipFromRight, completion: nil)
frontImageView.image = UIImage(named: "apple")!.withRenderingMode(.alwaysTemplate)
frontImageView.tintColor = UIColor.occasionalColor
positionCounter = 1
} else {
item.transition(from: frontImageView, to: backImageView, duration: 1, options: .transitionFlipFromRight, completion: nil)
positionCounter = 0
}
}
}