UIRotationGestureRecognizer *rotationGesture = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotate:)];
For more details..you can refer to Apple' Sample code called Touches. [piece addGestureRecognizer:rotationGesture];
[rotationGesture release];
UIPinchGestureRecognizer *pinchGesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(scale:)];
[pinchGesture setDelegate:self];
[piece addGestureRecognizer:pinchGesture];
[pinchGesture release];
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)];
[panGesture setDelegate:self];
[piece addGestureRecognizer:panGesture];
[panGesture release];
UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
[piece addGestureRecognizer:longPressGesture];
[longPressGesture release];Note: Writing blog after so long.. I was so busy travelling... hardly had any time on hand.. but now its getting better, I will have more time on hand to blog.
No comments:
Post a Comment