UIScrollView. ¿Cómo puedo distinguir entre acercar y alejar?

On iOS I have a UIScrollView subclass. During a zoom gesture I need to distinguish zoom-out from zoom-in. What is the best way to do this?

Gracias,
Doug

preguntado el 09 de marzo de 12 a las 17:03

1 Respuestas

In UIScrollViewDelegate's scrollViewWillBeginZooming:withView:, store the current zoomScale de tu UIScrollView; compare the stored value to the zoomScale en el objeto scrollViewDidEndZooming:withView:atScale: to determine if it was a zoom in or a zoom out. If the value has increased, it was a zoom in; otherwise, it was a zoom out.

respondido 09 mar '12, 17:03

Close. Actually I need realtime updates to minify/magnify status so I update store zoom in scrollViewDidScroll:. Cheers. - Dugla

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.