Emulate iOS zoom tool in Safari/Mail etc - ios

I have a full screen UIView that is the application's main view that the user interacts with. The user is allowed to slide their finger across the view, and I need to zoom the area around a user's finger. Somewhat similar effect to the text entry fields in most iOS apps where if you tap, hold and slide your finger, the text around your finger zooms.
Any thoughts?

There is an open source control that does exactly that: https://github.com/acoomans/iOS-MagnifyingGlass

Related

iOS Pinch to zoom/rotate optimization for small items

I am playing with the pinching/dragging/rotating gestures (working with the gestures, not raw touch events). It works nice, but I have noticed one problem. For pinching/rotating both fingers need to be inside the view. As long as the view is large enough its not a problem, but as soon as the view becomes very small (in regards to the parent thats a scrollview), it feels a little bit like struggle to get the view "back". I have been checking some other apps, and Whatsapp does that the best. When you add a emoticon to an image inside Whatsapp, you can do all the gestures without the need to have both fingers on the view. For example, I made the emoticon really small, put two fingers so that the emoticon lies between them, and the gesture recognizer applies my movement to the emoticon (but not the to the scrollview which is the superview). When I do it inside my App the gestures are being applied to the scrollview as long as I dont place both fingers on the view I want to transform
Is there some setting on the gestures so it does that or do I have to work with raw touch events and calculate my own stuff ?
Thanks

Free Scrolling in Xcode 8.3.3

I want to create a page with a big image as background and buttons that users can interact with.
So imagine I put a big image such as a piece of map into the screen, but I only show a corner of the map in the display. So if a user wants to see other parts of the map, they have to "scroll" and navigate to wherever they want.
Meanwhile I also want to put a button they can tap on, and that button should lead to a php webpage (in-app, not opening in safari or else) or information page about sites and buildings in this location.
I am a rookie and I haven't have any code written down yet. I am thinking about using UIScrollView and UIButton, but am I on the right direction? Any advice?
Thanks in advance!
First you need a way to pinch zoom the image. In this mode, you can drag the image in any direction that you want. A common method can be found here. A scroll view can only scroll horizontally or vertically but with that image zooming, each image can be zoomed in and then dragged to any direction you want. You can have a scroll view with only one image.
After you have the image zooming ready, all you need to do is to create a subview on your screen to cover part of the image view or scroll view, whatever you used.

Circular scrolling in iOS that follows your finger?

So I am trying to figure out how to make a circular scrolling system. So I have for example a wheel like this http://static.cubiq.org/uploads/2009/04/Rotating-wheel.jpeg and you scroll between options (like an old school ipod) Now I currently already have this working with positions. So I have positions 1-6 and as you scroll down, it moves everything down a position and I animate this transition. I am wondering if there is a way to do this using the actual scroll function. So that you can scroll up and down freely while holding down, rather then doing up or down actions and waiting for animation.
So given that information how could I convert a standard vertical scroll up->down and down->up into a circle structure. Thanks for any info

ios paper app: swipe from off screen

I am studying Paper App from Fifty Three and find it very interesting the way they used for various gesture.
To differentiate the gesture from the PAN that they use for drawing, to turn the pages, you need to swipe from off the screen(as in outside of iPad screen) into the view to work.
How to implement that?
I don't have access to Paper's code, but I would guess they are using a UIPanGestureRecognizer only along the sides. Since the recognized 'captures' the touch, it wouldn't trigger their main drawing mechanism, but would catch only slides from offscreen - it might be only about 10-20pts wide.

Drag/Swipe to scroll the screen

What would be the best way to have a vertical scrolling screen? My game will consume two screens high, the user should be able to move between the two screens by a simple drag or swipe action. The background is not tiled and sprites will be placed on it. What would be the best way to go about such screen management?
You have asked two questions here. The fist of which is how to respond to touch gestures (like a swipe). This blog post and associated sample is a good starting point.
The second of which is how to have two screens. This is also simple. Pass a translation matrix (Matrix.CreateTranslate) into SpriteBatch.Begin. How you want to do this is up to you. If you want both screens to have (0,0) be the top left of the screen, give each of them a translation matrix and translate one downwards by the display's height below the other. (While a screen is out of view, you could skip drawing it entirely.)
When the user swipes, simply animate the translation such that one screen moves out of view, and the other moves into view.
It depends on whether you want users to be able to see half of the top and half of the bottom screen, or only ever the top or the bottom.
You could try placing the two screens worth of content into a ScrollViewer, and setting the ScrollViewer.VerticalScrollbarVisibility to False; this would allow users to drag/swipe easily between the "screens".
Something like:
<ScrollViewer VerticalScrollBarVisibility="Hidden">
<my:FirstScreen/>
<my:SecondtScreen/>
</ScrollViewer>
One thing to consider would be whether you want to handle the user changing the phone orientation, or whether you'll lock the phone into Portrait/Horizontal orientations. I also believe that phones with different resolutions will eventually be released and any applications in the Windows Marketplace will need to be able to handle both full and half resolutions.

Resources