Skip to content

Instantly share code, notes, and snippets.

View ValentinFesenko's full-sized avatar

Valentin Fesenko ValentinFesenko

  • Ukraine, Kharkiv
View GitHub Profile
@TimOliver
TimOliver / UIScrollView+ZoomToPoint.m
Last active June 9, 2024 14:12
Zooming to a specific CGPoint inside a UIScrollView (2015 Edition)
@implementation UIScrollView (ZoomToPoint)
/**
Zooms into the specified point of the scroll view's zoomable content view at the supplied scaled.
(The zoomable content view is the view that is returned in `viewForZoomingInScrollView:`
@param zoomPoint - In terms of the scroll view's co-ordinate space, the point to zoom to
@param scale - A value between minimumZoomScale and maximumZoomScale in which to zoom to.
@param animated - Whether the transition is animated, or instant