How to set the zooming effect in all the subviews of UIScrollView - ios

I am going through the sample code (https://github.com/vfr/Reader), and tried to add the same zooming effect in all the pages at the same time. for ex: if the user increase the zoom effect in 2nd page it will set the same zoom effect in all the pages. Not getting any idea how to do this...Edit:
In Short,how to resize all the subviews of UIScrollView according to the zoomin / zoomout.

The reader you are using provides zoom in and zoom out options by default. If that doesn't work just check if you have allowed multiple touches.

Related

Nested UIScrollviews, how to make one zoom out whilst the other zooms in at the same time?

I am trying to figure out how to achieve this. I want to have a view centred on the screen that can be pinched for zoom in and zoom out but also be panned across the screen. One way I thought of trying to replicate this was to have a UIView within UIScrollView. Let's say the UIView is just a black square. The UIView will be the same size as the UIScrollView and always remain centred. When I pinch the UIView to zoom out, as it gets smaller and the UIScrollView will zoom in at the same rate. This allows space to pan. The UIView would of shrunk, remained centred and the UIScrollView's content area increased. Is this something that is possible? Is using a UIScrollView the wrong way to go about it?

Zooming CALayer blurs the view

I want to zoom a CAlayer placed on UIView, and this view is on UISCrollview. I'm using scrollviews delegate methods for zooming. It zooms but it blurs. How to remove blur and improve zooming?
I have tried with CATiledLayer but I don't want to show tiling effect. So how can I improve zooming using CALayer?
I had a similar experience when zooming in content. When a UIScrollView is zooming, it takes a snapshot of the View, and zooms in on that picture. This is the reason it gets blocky when zooming. When the zooming/panning is complete, use the delegate to re-render the content according to your zoom level. The content then should be 'crisp'.
Warning: do not zoom in too far, the memory used by the snapshot will soon be larger than your available memory.
I didn't use images, but CAShapeLayers and paths. I put together a demo project and explanation here : http://simplicate.weebly.com/1/post/2013/06/fixing-blocky-paths-in-ios.html
I hope that helps.

Sync zoom of UIImageView with UIScrollView's viewForZoomingInScrollView:

I'm developing some kind of custom map, which will present additional information above map content (I will call it overlay). But overlay rendering very hard process so I render only that part which user can see on the screen at this moment. But I also want when user zoom or pan map, overlay zoom and pan too (without re-rendering, of course, because it require a time to do it). So my overlay is UIView with UIImageView subview. During user pan I look for contentOffset changes (map content presents on UIScrollView) and move my imageView to that offset (change origin of it's frame), so this is very quickly. When user detach fingers from screen I set initial frame to imageView and re-render it. How can I do similar with zoom? I tried monitor for zoomScale changes and contentOffset, but imageView move not like map content. Any suggestion how to do it will be useful for me
I solved my by problem coming from another side to it. Instead of calculating offsets and zoom scales, I add overlay to map content as subview, so it moves and scales with it very good. When user detach fingers from map, I remove it from superview and re-render it

How to Zoom in and Zoom out ImageViews of in a scrollView

I have a scrollview in which i m showing all the imageViews from an imageArray and i have done paging enabled. Now i want to zoom in and zoom out the images in the scrollview. Can someone tel me whats the best way on doing it ??
You can-not zoom in and out of a scrollview built for paging, you can only slide between pages... you need to nest another UIScrollView within that first "paging" scroll view that is built for zooming (i.e. paging is disabled and multi-touch and zoom is enabled)
There's a WWDC 2010 video which have very nice tutorial for UIScrollView.This tutorial have very efficent techniques to do paging with zoom enable.Check this also

How to implement a zoomable UIPageViewController when in Two Pages mode?

I need to implement a zoomable UIPageViewController in iOS 5 when in a two pages layout mode (in other words, when the Spine Location is set to Mid).
Using a scrollview for each page works fine when only one page is displayed. But when two pages are diplayed side-by-side in landscape mode, how can one seamless synch the pages and align the borders during the zoom animation?
One possible solution would be to put the UIPageViewController inside a bigger UIScrollView controller, but this yelds a blurred image because the two scrollviews inside the pages are not updated with a higer resolution area of the source images when the parent is zoomed.
It seems that is impossible to zoom inside a UIPageViewController when in two page mode. Is there someone who found a solution to this?
Thanks in advance.
I am still testing, but I have this.
I used the pageviewcontroller template.
I changed the scene to show a image instead a month (inside a UIImageView).
used a UIPinchGestureRecognizer to zoom the image and an UIPanGestureRecognizer to move the image once it is zoomed and it works.
The only problem is sometimes the page swipe is recognised instead the pan, so it changes the page instead moving the inside image.
And it only zooms a page at a time, I marked clip subviews in the view of the dataViewController, so 2 pages remains the same size even when you zoom in the other.

Resources