I am working on puzzle games and let me rotate the puzzle piece to 90 degrees angle Need on every dual taps
The first method I have tried to use in two different ways is:
[UIView startup permissions: @ "to rotate" reference: zero]; [UIView Set Animation Duration: 0.5]; Self.transform = CFE regenerationMarketation (90); [UIView commitAnimations]; There are problems with this that the piece is not rotating in the 90 ; It rotates around 100 degrees, and it is amending the frame of the animation puzzle piece UIView .
This is my console output:
CABasicAnimation * spinAnimation = [with CABasic animation animation: @ "Transformation. Spin animation.Tavaluos = [NSNumber Number: Flat: 1]; [Self Learner Ad Animation: For Spin Animation: @ "Spin Animation"]; The problem with this method is that after completing the rotation, it is rolling out my UIView in its previous state.
How would I rotate the puzzle piece with animation without these problems?
Try
[UIView startAnimations: @ "rotate" context : Zero]; [UIView Set Animation Duration: 0.5]; Self.transform = Cegiphentransfermarmatocotation (degree orradia (90)); [UIView commitAnimations]; Where you can define the degree tetheradien
#define Degree ToRadians (x) ((x) * M_PI / 180.0)
Comments
Post a Comment