How to show a small preview of a UIScrollView content? - ios

I want to show a small preview of the current area being displayed of UIScrollView like Sublime text editor does.
Imagine that my UIScrollView size is 640x480, but the content is 640x960.
When I scroll I want to be able to show a small preview of the whole UIScrollView content in the top right corner, making possible for the user to understand which part of the UIScrollView he is actually looking at.
How do I achieve such thing?
CAReplicator?
CAScrollLayer?
I'm kind of lost here so any tips would be awesome.
Thanks,
With my best regards,
Nuno

Related

Quick scroll by touching scroll indicator in UITextView

I'm trying to create the effect seen in some iOS apps where swiping the screen scrolls the ScollView/TextView normally, but sliding on the far right (where the scroll indicator is) creates a quick scrolling effect that allows the user to scroll through the position in the overall length of the view. For example, sliding on the far right from the middle of the screen to the bottom would take the TextView from the middle of its content to the very end.
Is there any pre-established way to do this, or is this an effect I would have to create from scratch?
Thanks a lot for any help, and I'm sorry if this question wasn't very clear.

Scroll screen in IOS

I have been trying to find a way to use a background image so that it is larger than the device screen size, IE: the user can scroll from top to bottom and side to side to view the entire image.
This is something I'm looking at in gaming. I just haven't found any way to do this, I know its because I'm looking in the wrong place or asking the question in an incorrect manner, so any help would be appreciated.
For this problem you can use scrollView and insert in it a content view , and give it say 3 times widths/heights of screen , see demo here ScrollAnyway

Make UIScrollView scroll from scrolling inside OR outside of it

Say I have a UIScrollView that scrolls horizontally just fine. It's height is around 50px. After usability testing, a lot of people are trying to scroll the contents by panning outside of it. Here is the setup:
Where it says "Amount" is the scrollview
I am wondering if it is possible to attach a UIPanGestureRecognizer on the blurred background it sits on top of and have it scroll along with that as well. If this is possible, could someone give me a start on what that approach would possibly look like?
Nah, the simple solution is simply make the scroll view bigger .. it's just that simple.
Have it mostly transparent, with your content sitting where you want it.
What you describe in your question is a good idea but it's extremely! hard to really implement well, a total pain. You simply "make the scroll view bigger".
Nice looking app.
These may be relevant to you...
The UICollectionView "swipe-away" in iOS7 app manager?
Show/hide UIToolbar, "match finger movement", precisely as in for example iOS7 Safari

PDF in UIWebView: Initial view to fill view

I have a UIWebView that displays a PDF. By default it opens the PDF and scales it to fit the entire width in the view, but not the height. I want it to fill the view so that the height stretches down to the bottom.
I have tried using contentModeScaleToFill, zoomToRect, and any other thing that sounded like it might have any relevance.
Can anybody help with this?
You might want to try #Jeff's suggestion and use CGAffineTransformScale to rescale your pdf after it is loaded to fill the screen. Look at his answer here: https://stackoverflow.com/a/3600665/188675
And to answer your question, 1) contentModeScaleToFill is a UIView Constant so it won't help with anything in your case, because you're using a UIWebView. 2) Using CFAffineTransformScale is much more simple and straightforward than using zoomToRect because you don't have to mess with the scrollView.

iOS Horizontal Menu w ScrollView

I want to make a horizontal scrollview menu like top of picture at bottom.(NEWSLETTER, CITY, WOMEN etc.) I'm researching for two days. But i didn't find a solution for my problem.
This menu must can loopable. Selected item will be at center of screen. And have a effect like paging. But when i pagingEnabled on scroll view it's making pages for every frames. I want a page each menu item.
Someone can give me some idea?
Thank you.
There's some decent options out there for wrapping the content in your UIScrollView. Check out: Make UIScrollView wrap around.
Also take a look at this github project: https://github.com/jonah-carbonfive/WrappingScrollView

Resources