SKInfiniteScroll for iOS a subclass of UIScrollView through which users can able to scroll their images continuously without doing much.
When contentoffset reaches to end of the offset, it will restart scrolling from beginning without jerk.
Below image shows infinite scroll in an iOS application.
Step 1: Download SKInfiniteScroll. In that, you will see a folder named as ‘‘SKInfiniteScroll’’. Just drag that folder to your project as shown in below image.
Step 2: Make sure to enable checkmark of “copy item…”.
First of all, get an array of UIImage that you want to add in the infinite loop.
NSMutableArray *array = [NSMutableArray arrayWithObjects: [UIImage imageNamed:@"1.jpg"], [UIImage imageNamed:@"2.jpg"], [UIImage imageNamed:@"3.jpg"], nil];
Now, call “createAnimateScrollOfImages” class method of SKInfiniteScroll
CGRect scrollRect = CGRectMake(0, 0, 100, 400); CGSize imageSize = CGSizeMake(100, 100); [SKInfiniteScroll createAnimateScrollOfImages:array ofScrollRect:scrollRect ofImageSize:imageSize InView:self.view withDirection:kScrollDirectionBottom];
ScrollRect: its frame of the scroll view.
ImageSize: its defines visible size of each imageview inside scroll view
InView: a view inside which scrollview should visible
withDirection: a direction in which you want to animate images. It supports all the four directions for animation.
If you want to download SKInfiniteScroll class with the complete example, click the following button. You can use it in your next project.
Do you have any iPhone app development idea that you want to execute? Do you still have any query about how to create SKInfiniteScroll in iOS app, comment down below, Our developers will get in touch with you ASAP.
LET'S TALK VALIDATE YOUR IDEA!