3
我使用UIPinchGestureRecognizer檢測捏的手勢,這樣的:如何使用UIPinchGestureRecognizer檢測或定義捏合手勢的方向?
- (void) initPinchRecon {
UIPinchGestureRecognizer *pinchRecognizer = [[[UIPinchGestureRecognizer alloc]
initWithTarget:self
action:@selector(Perform_Pinch:)] autorelease];
[self addGestureRecognizer:pinchRecognizer];
[pinchRecognizer setScale:20.0f];
}
- (void) Perform_Pinch:(UIPinchGestureRecognizer*)sender{
NSLog(@"PINCH");
}
,而且運作良好,檢測一個簡單的捏放:這是可能的,以確定(或定義自己)縮放手勢的角度或方向?,例如,區分水平和垂直捏手勢?
感謝