UIView UIPinchGestureRecognizer problem

点点圈 提交于 2019-12-25 03:15:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!