UIScrollView (or at least visible ) inside UIScrollView) that zoom in and out When they do zooming or scrolling, I want to keep the images in my position while doing them.
The case of use is that I have a customized map view with pushpins. I want Pushpin to be in the spot while zooming and scrolling in the map, but I want them to "zoom in" "Do not want to.
What is the best way to do this?
You can view your pushpin images as a subview of your UIScrollView but can not return any subviews of the view
- (UIView *) viewForZoomingInScrollView: (UIScrollView *) scrollV Then, in the scrollViewDidZoom the zoomScale pin is adjusted correctly to adjust the pushpin x and y: < / P>
- (zero) scrollviews zoom: (UIScrollView *) scroll view {imageView.frame = CGRectMake (pushPinX * scrollView.zoomScale, pushPinY * scrollView.zoomScale, imageView.frame.size. Width, imageView Frame.size.height); }
Comments
Post a Comment