Is there any method make the UICollectionView zoomable, i.e. when you pinch, all the cells can be zoomed in and out.
I can implement this in UIScrollView by returning the only subview of the UIScrollView from delegate method
- (UIView*)viewForZoomingInScrollView:(UIScrollView *)scrollView
Since UICollectionView is kind of UIScrollView, is there a way or work around to implement this? Does the UICollectionView has one direct subview that contains all cells?
Thanks
I think what you’re asking for looks like what is done in the
WWDC1012video entitled Advanced Collection Views and Building Custom Layouts (demo starts at 20:20).You basically have to add
pinchGestureto youUICollectionView, then pass thepinch properties(scale, center) to theUICollectionViewLayout(which is asubclassofUICollectionViewFlowLayout), your layout will then perform thetransformationsneeded tozoomon the desired cell.