简体   繁体   English

UiTouches上的滚动视图不起作用,如何设置痛苦的应用程序中的缩放

[英]UiTouches on scroll view not working, How to set zoom in pain app

I have implemented a paint application using UITouches by following RayWenderlich tutorial 我通过遵循RayWenderlich教程使用UITouches实现了绘画应用程序

Make A Simple Drawing App with UIKit 使用UIKit制作一个简单的绘图应用程序

I completed my paint successfully. 我成功地完成了油漆。

But * I need to set zoomin and zoom out functionalitie *s, 但是* 我需要设置放大和缩小功能 * s,

So that i added my ImageViews on UIScrollView. 这样我在UIScrollView上添加了ImageViews。

But the paint is not working due to UITouches not working on UIScrollView . 但是由于UITouches在UIScrollView上不起作用,所以绘画无法正常工作


I know due to scrollable behavior touches are are not working,
But even after i disable the scrollable option its did not works.

I implemented zooming functionality with Pinch Guesters but, it is not able to see out side zoomed, its just able to see zoomed image with in the window. 用Pinch Guesters实现了缩放功能,但是它无法看到外侧缩放,只能在窗口中看到缩放的图像。

Can anybody suggest me how to handle perfect zoom in paint application 有人可以建议我如何处理绘画应用程序中的完美缩放吗?

If you want the below touch methods on the UIScrollView 如果要在UIScrollView上使用以下触摸方法

• touchesBegan •开始

• touchesEnded •touchesEnded

• touchesMoved •touchesMoved

• touchesCancelled •touchsCancelled

then you need to subclass your UIScrollView and then you can implement all these mehods: 那么您需要继承UIScrollView的子类,然后可以实现所有这些方法:

Cheers!! 干杯!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM