Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
iOSには、UIScrollViewサブクラスがあります。ズームジェスチャ中に、ズームアウトとズームインを区別する必要があります。これを行うための最良の方法は何ですか?
ありがとう、 ダグ
では、現在UIScrollViewDelegateの;をscrollViewWillBeginZooming:withView:保存しzoomScaleます。UIScrollView保存された値と を比較してzoomScale、scrollViewDidEndZooming:withView:atScale:ズームインかズームアウトかを判断します。値が増加した場合、それはズームインです。それ以外の場合は、ズームアウトでした。
UIScrollViewDelegate
scrollViewWillBeginZooming:withView:
zoomScale
UIScrollView
scrollViewDidEndZooming:withView:atScale: