问题
I have an UIViewController contains an UIScrollView and UIScrollView contains an UIImageView, and I have my Gesture Recognizers tap and pinch. When UIView called inside another view it becomes fullscreen, and when my UIView double tapped it hides itself and main view appears again. No problem till pinching. UIPinchGestureRecognizer not working. I dont think its responder problem because, tapping works. I think its about setting MultipleTouchEnabled values (but not sure). if its with a structure like mine (UIViewController->UIScrollView->UIImageView) which views needs to be set as MultipleTouch enabled. My UIPinchGestureRecognizer target is UIViewController (self) for both pinch and tap.
if it will help I can post needed part of my code.
thank you.
回答1:
try setting
yourImageView.contentMode = UIViewContentModeScaleAspectFit;
来源:https://stackoverflow.com/questions/3735440/uiview-uipinchgesturerecognizer-problem