Skip to content

kostyabl/KBCScrollView

Repository files navigation

KBCScrollView

KBCScrollView class provide a horizontal scroll (carousel) UIViews in UIScrollView. The class is designed to make it quick and easy.

Demo

alt tag

Installation

Just add KBCScrollView.h and KBCScrollView.m files to your project.
Or use CocoaPods:
pod 'KBCScrollView'

Usage

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.

Delegate methods

Setup

  1. Your object should to conform a protocol KBCScrollViewDelegate
  2. 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;

About

UIView slider / carousel

Resources

License

Stars

Watchers

Forks

Packages

No packages published