So I'm building a game in which the user clicks on a square, which
- scales up to 1.2 (
CGAffineTransformScale
)
The square then automatically:
- rotates 90 degrees (
CGAffineTransformMakeRotation
)
- scales back down to 1.0 scale(
CGAffineTransformScale
)
This works for the first square, but when the user tries to click on another square, the square does not zoom in. The user must take these steps to click on the next square:
- click on the previous square (from the paragraph above)
- square then rotates back to its original transformation (even though it is supposed to be scaling up)
The user can then proceed to choose the next square, with the transformations working correctly.
NOTE: The squares are UIView
(s) and the transformations are CGAffineTransformation
(s).
Is there a way to "commit" the transformations so that the user can click the next sqaure without having to undo the previous square's transformations?