So I'm building a game in which the user clicks on a square, which
CGAffineTransformScale
)The square then automatically:
CGAffineTransformMakeRotation
)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:
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?
To translate a view from its current position, you would pass the view's transform property as the first parameter.
This blog gives a great explanation as to how tranform works: http://iphonedevelopment.blogspot.com/2008/10/demystifying-cgaffinetransform.html