ios - UIPinchGestureRecognizer in UIView is not working properly -


i trying zoom-in , zoom-out in uiview using uipinchgesturerecognizer. when pinch on trackpad, not recognising pinch , control not going twofingerpinch function. using following code.

- (void)viewdidload { //....... uipinchgesturerecognizer *twofingerpinch = [[uipinchgesturerecognizer alloc]                       initwithtarget:self                       action:@selector(twofingerpinch:)];     [myview addgesturerecognizer:twofingerpinch]; //..... }  - (void)twofingerpinch:(uipinchgesturerecognizer *)recognizer {     nslog(@"pinch scale: %f", recognizer.scale);     if (recognizer.scale >1.0f && recognizer.scale < 2.5f) {         cgaffinetransform transform = cgaffinetransformmakescale(recognizer.scale, recognizer.scale//);         myview.transform = transform;     } } 

why not recognising pinch trackpad? there other method same?

first click on option button. 2 gray spots can move using mouse or trackpad. in older versions need press shift+option.

for more details check this.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -