KBCScrollView class provide a horizontal scroll (carousel) UIViews in UIScrollView. The class is designed to make it quick and easy.
Just add KBCScrollView.h
and KBCScrollView.m
files to your project.
Or use CocoaPods:
pod 'KBCScrollView'
Add UIScrollView view on ViewController in storyborad and create outlet
Setup KBCScrollView by adding few line of code:
Array with yours UIViews
NSMutableArray* arrWithUIViews = ...
Assign your array to KBCScrollView.views
self.scrollView.views = arrWithUIViews;
It's all for minimal init. For more information, see example project.
Setup
- Your object should to conform a protocol KBCScrollViewDelegate
- Set delegate, example. :
self.scrollView.kbcScrollViewdelegate = self;
Current page did change.
-(void)currentPageDidChage:(NSUInteger)pageNumber;
View did tapped
-(void)didTappedToView:(UIView*)view onPage:(NSUInteger)pageNumber;