Creating uicollectionview layout 3x3 and horizontal paging - ios

I have a UICollectionView and I want to make it to show at most 9 images on the screen at a time... 3x3 and I want to load 9 at a time by scrolling from the right to the left (and being able to see the ones already loaded, without reloading be scrolling from left to right).
I've been doing some research and I don't think I know how to even ask the correct question.
Does anyone have any idea where I can start to look?
Thanks.

I think this is a good place to start.

Related

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

Nesting scroll views

"It just works", or does it?
So I was going nuts trying to fit one ScrollView into another.
I get to the point when I actually made two separate xib files, did a scrollable label in one, and a scrollable image in another. Both are works perfectly in separate xib's.
After that I manage to open xib files as simple text(looks like they are formatted as XML or something similar) and simply cut scrollable image view(with all of superviews that I needed) into my main.(containing scrollable label)
So the idea was simple yet beautiful, I was like 90 percent sure it is going to work, because I inserted all the necessary view-scrollView-contentView stuff. And it is not. As you can see guys, image is big enough, views setted to be large and you can barely see tiny bit of it. So it SHOULD be scrollable, right?
Label with text keeps scrolling just fine, but the image wont move.
I was also trying to get scroll enabled via code, setting property to YES, but it wont help.
I also tried disabling auto-layout, thinking that it could be easier, but it was not much luck on the first attempt. Will be great to hear you guys thoughts, maybe I should disable auto-layout and try it out the old-way? Or is there a way to solve this puzzle as is?
Maybe my question was a bit long and not much of a readable, sorry for that guys, anyway I found my answer and will post a solution for any of you guys wondering about the same thing.
Just a reminder, I was trying to achive scrollable text+ scrollable image. Text should be scrolled up/down and the image should be scrolled in all directions.
So I find my previous attempt almost completely broken and started fresh(couple of times) and in the end I find the configuration that suits my needs.
Matter of fact, this particular configuration works almost exactly out of the box, most of the trick is get the right views in position. After that you just have to add missing constraints from the "Editor"->"Resolve layout issues" menu and get rid of few nonsense constraints that IB add god know why.(like those ones that adds 200pt blank space at the bottom or so)
After that you'll be pretty much set. If not, refer to the picture link, or github repo. Hope that will help someone.

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

Best way implementing infinite scrolling with Sprite Kit

I found some good answers about infinite horizontal scrolling
But what I would like to do is an infinite scrolling background, horizontal and vertical.
So far I thought about setting 9 backgrounds and replace 3 of each every time one goes away from the screen.
Can anyone tell me if this is the best solution or if there is other easier way to do this?
Thank you in advance

How to apply UIView shifts when scrolling between pages

i'm trying to apply a shift effect to subviews of a UIView, but those shifts should'n have the same phase. A good example of that is the welcome screen in SoundClound.
As you can see, in the second image i'm scrolling to the second page, and the label slides more than the image (so it looks that the label moves faster than the image). So the subviews lose the alignment when scrolling, but recover it back if we stop the swipe.
Does anyone know how this effect is named? and where can i find some help to implement it?
Thanks a lot!
"Parallax scrolling" is what you want to search for.
Basically it is done by moving foreground objects faster background objects to simulate depth.
Check out http://blog.denivip.ru/index.php/2013/08/parallax-in-ios-applications/?lang=en for a starting point!

Resources