1
複数の要素に対してビュートランジションを使用しようとしましたが、間違いがあります。スタティックメンバ 'transition'は 'UIView'タイプのインスタンスでは使用できません。 私は同様の議論を読んだが、私の場合は実装できませんでした。 私を助けることができますか?クラスメソッドの詳細については、'UIView'タイプのインスタンスでは、スタティックメンバ 'transition'を使用できません
UIView.transition(from: backImageView, to: frontImageView, duration: 1, options: .transitionFlipFromRight, completion: nil)
:遷移がクラスメソッドであるためです
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
}
}
}
ありがとうございましたが、それは私が、配列のすべての項目で、この移行を得るためには役立ちません。 – Roman