GithubHelp home page GithubHelp logo

rickytan / rtpagingviewcontroller Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 5.0 698 KB

A simple to use Paging View Controller, a Android ViewPager Implimetation

License: MIT License

Objective-C 98.61% Ruby 1.39%

rtpagingviewcontroller's Introduction

RTPagingViewController

Description

This is a iOS implementation for Android ViewPager. Most existing third party container view controllers didn't manage children view controllers' view appearence life cycle properly.

In a normal case, a controller's view appearence method should be called in following order:

  • viewDidLoad:
  • viewWillAppear:
  • viewDidAppear:
  • viewWillDisappear:
  • viewDidDisappear:
  • viewDidUnload:

So I decided to build my own Container Controller, which handles view appearence correcttly, and it takes time...

Apple Doc

Finally, I have got the right result:

Features

  • Handle view appearence properly
  • screen rotation support

Usage

FirstViewController *vc1 = ...;
vc1.title = "View1";
SecondViewController *vc2 = ...;
vc2.title = "View2";
...

RTPagingViewController *paging = [[RTPagingViewController alloc] init];
paging.controllers = @[vc1, vc2, ...];
paging.titleFont = ...;
paging.titleColor = ...;
paging.selectedTitleColor = ...;
paging.titleIndicatorView = ...;

Screenshot

screenshot

License

MIT

rtpagingviewcontroller's People

Contributors

rickytan avatar

Stargazers

Erick Sanchez avatar moubuns avatar Caesar@2017 avatar  avatar Quintus_Horace avatar Harimoto avatar Jerry Bao avatar  avatar Manuel Maly avatar Wayne Dahlberg avatar

Watchers

 avatar 煎饼果子 avatar  avatar  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.