Latest 0.1.11
Homepage https://github.com/Operators/pages-controller-ios
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Pages Controller iOS

UIPages is a wrapper framework for the UIPageViewController UIKit class. Each Pages component is supplied through a UIPagesDataSource which is used to interact with the related storyboard. The UIPagesDataSource class allows us to cycle through the storyboard components, and it keeps up with its current index while cycling.

Setup

Installation

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

pod "UIPages"

Defining a Page

define

Add your controller onto the storyboard, then update the "Storyboard ID"

assign

After updating the "Storyboard ID", you can then reference the controller in your UIPagesDataSource:

#import "WalkthroughController.h"

@interface WalkthroughController () <UIPagesDataSource>
@end

@implementation WalkthroughController
-(NSString*)getStoryboardName {
    return @"Walkthrough";
}
-(NSArray*)getIdentifiers {
    return @[@"suggestions"];
}
@end

After that implement a UIPagesDataSource can be defined in Swift as well:

class WalkthroughController : UIPagesDataSource {
    func getStoryboardName() -> String {
        return "Walkthrough"
    }

    func getIdentifiers() -> [AnyObject] {
        return ["suggestions"]
    }
}

Example Project

The PagesObjCExamples Project has 6 screens referenced by the Walkthrough Storyboard and Controller. To demonstrate how the swipes action will work on first launch of the application, this sample uses the UISwipes framework.

storyboard

suggestions swipes

Above are two of the (six) Walkthrough screens, that display how an demonstration can be integrated into you app walkthrough.

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

git clone https://github.com/the-mac/pages-controller-ios.git
cd PagesObjCExamples
pod install
open PagesObjCExamples.xcworkspace

Requirements

For your own project (and Podfile), our UIPages reference could look as follows:

platform :ios, '8.0'
target 'MyAppTarget' do
    pod 'UIPages'
end

License

UIPages is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UIPages",
    "version": "0.1.11",
    "summary": "Enhanced wrapper framework around UIPageViewController",
    "description": "Wrapper framework around UIPageViewController that requires a storyboard and string references to the Controllers of the storyboard",
    "homepage": "https://github.com/Operators/pages-controller-ios",
    "license": "MIT",
    "authors": {
        "Christopher Miller": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Operators/pages-controller-ios.git",
        "tag": "0.1.11"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "UIPages/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This