dorald / KBCScrollView

UIView slider / carousel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Objective-C 75.0%Language:Ruby 25.0%