Code Monkey home page Code Monkey logo

crpageviewcontroller's Introduction

CRPageViewController Awesome

CI Status Version License Platform

Header image

Meet Page View Controller for iOS by Cleveroad

Hey, guys! Cleveroad team has got something really interesting for you. Meet our new iOS library - CRPageViewController. We’re sure that you’ve already checked the convenience of Page View long time ago. But we’ve made something that will make navigation between pages of your app even handier.

Demo image

While a standard page view allows you to navigate between pages by using simple gestures, our component goes further. CRPageViewController allows defining a page size by setting width and heights manually. Thus, users will be able to control the placement of pages on the screens in the way which is more suitable for them.

We’re convinced that users will find this component really useful and will be grateful for such a good tool.

Awesome

Requirements

  • iOS 8 or higher

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CRPageViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "CRPageViewController"

and run pod install in terminal.

Usage

@protocol CRPageViewControllerDataSource <NSObject>
@required

//Returns the view controller after the given view controller.
- (UIViewController *)pageViewController:(CRPageViewController *)pageViewController
viewControllerAfterViewController:(UIViewController *)viewController;

//Returns the view controller before the given view controller.
- (UIViewController *)pageViewController:(CRPageViewController *)pageViewController
viewControllerBeforeViewController:(UIViewController *)viewController;

@optional

//ViewController moving to center PageController
- (void)focusedViewController:(UIViewController *)viewController;

//ViewController moving from center PageController
- (void)unfocusedViewController:(UIViewController *)viewController;

CRPageViewController

//DataSourse of PageViewController
@property (weak, nonatomic) id <CRPageViewControllerDataSource> dataSource;

//Starting array of UIViewController in PageViewController
@property (strong, nonatomic) NSArray <UIViewController*> *viewControllers;

//Size of UIViewController in PageViewController
@property (assign, nonatomic) CGSize childVCSize;

//Vertical offset of UIViewController in center screen
@property (assign, nonatomic) CGFloat OffsetOfHeightCentralVC;

//Distance between child UIViewController
@property (assign, nonatomic) CGFloat sizeBetweenVC;

//Speed of animation change UIViewController on center PageViewController
@property (assign, nonatomic) CGFloat animationSpeed;

//Type of animation change UIViewController on center PageViewController
@property (assign, nonatomic) UIViewAnimationCurve animation;

//Count of UIViewController on PageViewController
@property (assign, nonatomic) NSInteger countPageInController;

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Support

If you have any questions, issues or propositions, please create a new issue in this repository.

If you want to hire us, send an email to [email protected] or fill the form on contact page

Follow us:

Awesome Awesome Awesome Awesome Awesome

License

The MIT License (MIT)

Copyright (c) 2016 Cleveroad Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

crpageviewcontroller's People

Contributors

jekaua avatar readmecritic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crpageviewcontroller's Issues

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.