Giter Club home page Giter Club logo

infinitepagingview's Introduction

InfinitePagingView

Overview

InfinitePagingView is a subclass of UIView. It contains an endlessly scrollable UIScrollView.

Features

  • Endlessly scrollable to horizontal (or vertical) direction.
  • Each page view contents are available to a UIView based custom view.
  • Implements paging delegate protocol.
  • Page scroll action methods.

Requirements

  • iOS 4+
  • Xcode 4.3 (Use ARC)

Screenshots

Screenshot0 Screenshot0 Screenshot0 Screenshot0

How to use

#import "InfinityPagingView.h"
...
- (void)loadView
{
    [super loadView];
    
    // create instance.
    InfinitePagingView *pagingView = [[InfinitePagingView alloc] initWithFrame:CGRectMake(0.f, 30.f, 100.f, 50.f)];
    
    // Adding each page views.(UIView based)
    // (At least 3 pages.)
    UIImageView *page1View = [[UIImageView alloc] initWithFrame:frame];
    [pagingView addPageView:page1View];
    ...
    [pagingView addPageView:page2View];
    [pagingView addPageView:page3View];
    [pagingView addPageView:page4View];
    [pagingView addPageView:page5View];
    
    [self.view addSubview:pagingView];
}

Build and run the project files. Enjoy more examples!

Public methods

- (void)addPageView:(UIView *)pageView;

Adds a view to the inner scrollview's subviews.

- (void)scrollToPreviousPage;

Scroll to the previous page.

- (void)scrollToNextPage;

Scroll to the next page.

InfinitePagingViewDelegate Protocols

- (void)pagingView:(InfinitePagingView *)pagingView willBeginDragging:(UIScrollView *)scrollView;

Tells the delegate when the paging view is about to start scrolling the content.

- (void)pagingView:(InfinitePagingView *)pagingView didScroll:(UIScrollView *)scrollView;

Tells the delegate when the user scrolls the content view within the receiver.

- (void)pagingView:(InfinitePagingView *)pagingView didEndDragging:(UIScrollView *)scrollView;

Tells the delegate when dragging ended in the paging view.

- (void)pagingView:(InfinitePagingView *)pagingView willBeginDecelerating:(UIScrollView *)scrollView;

Tells the delegate that the paging view is starting to decelerate the scrolling movement.

- (void)pagingView:(InfinitePagingView *)pagingView didEndDecelerating:(UIScrollView *)scrollView atPageIndex:(NSInteger)pageIndex;

Tells the delegate that the scroll view has ended decelerating the scrolling movement.

License

MIT License.

See LICENSE.txt for more information.

infinitepagingview's People

Contributors

caesarcat avatar

Watchers

Green avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.