JKMania
JKMania

Reputation: 239

UIView Rotation using CGAffineTransform

I want to rotate an UIView using CGAffineTransform and I'm able to rotate View using CGAffineTransform.

But I want to rotate UIView smoothly on finger touch based on swipe gestures.

So like right swipe, left swipe I was able to detect swipe but when I swipe from down to right or from down to left, I'm not able to detect swipe gesture of these types...

Upvotes: 1

Views: 1690

Answers (1)

Robin
Robin

Reputation: 10011

Sanjay these are the only allowable gestures that a iPhone supports

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISwipeGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/instp/UISwipeGestureRecognizer/direction

so I think you are trying to recognize a diagonal swipe gesture and the its not working.

and also there is a minimum numberOfTouchesRequired required for swipe gesture.

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISwipeGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/cl/UISwipeGestureRecognizer

And if you want to rotate a UIView object than I think you will find the code in this link

rotating a view on touch

Hope this helps.

Upvotes: 2

Related Questions