Code Monkey home page Code Monkey logo

xlpagertabstrip's Introduction

XLPagerTabStrip

By XMARTLABS.

Android PagerTabStrip for iOS!

XLPagerTabStrip is a Container View Controller that allows us to switch easily among a collection of view controllers. Pan gesture can be used to move on to next or previous view controller. It shows a interactive indicator of the current, previous, next child view controllers.

Screenshot of native Calendar Event Example

XLPagerTabStrip was originally inspired by Tell market app.

Purpose

XLPagerTabStrip helps us deal with view controllers that have the same relevance for the user like Android PagerTabStrip and PageView do. Since you're able to navigate between a large amount of view controllers, XLPagerTabStrip is an scalable and nice solution for this problem.

How to use it

Integrate XLPagerTabStrip is as easy as following these steps:

  1. Create a UIViewController class that should extend from either XLSegmentedPagerTabStripViewController, XLBarPagerTabStripViewController, XLButtonBarPagerTabStripViewController, XLTwitterPagerTabStripViewController.

  2. The recently created concrete view controller should conform to XLPagerTabStripViewControllerDataSource implementing: -(NSArray *)childViewControllersForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;

  3. (Recomended) Set up your view controllers using a nib file or a Storyboard. We need to connect some IBOutlets (take a look at the Demo folder).

  4. Enjoy!

For further details take a look at the Demo folder to see the code of examples shown above.

FAQ

#####How to change the visible child view controller programmatically

XLPagerTabStripViewController provides the following methods to programmatically change the visible child view controller:

-(void)moveToViewControllerAtIndex:(NSUInteger)index;
-(void)moveToViewController:(UIViewController *)viewController;

Installation

The easiest way to use XLPagerTabStrip in your app is via CocoaPods.

  1. Add the following line in the project's Podfile file: pod 'XLPagerTabStrip', '~> 1.0'.
  2. Run the command pod install from the Podfile folder directory.

Customization

The most interesting customizable features are:

  • Ability to skip intermediate view controllers when tapped on a "tab".
  • Indicators can be added at any position of the screen through storyboard layouts.
  • Choose between progressive, non-progressive indicators.
  • Add space padding between view controllers.

Requirements

  • ARC
  • iOS 7.0 and above

Release Notes

Version 1.1.1

  • Nav Button example added
  • Support for iOS 7.0 and above

Version 1.1.0

  • Twitter pager added
  • Bug fixes and stability improvements

Version 1.0.0

  • Initial release

Author

Martin Barreto (@mtnBarreto)

Contributors

Contact

Any suggestion or question? Please create a Github issue or reach us out.

xmartlabs.com. @xmartlabs

xlpagertabstrip's People

Contributors

mtnbarreto avatar pastorin avatar xhzengaib avatar

Watchers

 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.