GithubHelp home page GithubHelp logo

uyghurbeg / pagemenu-rtl Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 45 KB

A RTL paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram)

License: Apache License 2.0

Objective-C 100.00%

pagemenu-rtl's Introduction

PageMenu-RTL

ScreenShoot

Description

A fully customizable and flexible paging menu controller built from other view controllers placed inside a scroll view allowing the user to switch between any kind of view controller with an easy tap or swipe gesture similar to what Spotify, Windows Phone, and Instagram use. This is a RTL-edeted version and it is based on the Objective-C version of PageMenu.

##Customization For more description about PageMenu, please visit the author's source page:Click here.

#Usage

1.Insert CAPSPageMenu.h and CAPSPageMenu.m to your project 2.Import CAPSPageMenu.h to your main controller 3.Create a property like this:

@property (nonatomic) CAPSPageMenu *pageMenu;

4.Create your costum viewControllers 5.Insert this Code inside of viewDidLoad(Don't forget to replace DemoOneController, DemoTwoController, DemoThreeControler to your own controllers):


 DemoOneController *controller1 = [[DemoOneController alloc] init];
    controller1.title = @"باشبەت";


    demoTwoViewController *controller2 = [[demoTwoViewController alloc] init];
    controller2.title = @"مەسلىھەت";

    demoThreeViewController *controller3 = [[demoThreeViewController alloc] init];
    controller3.title = @"تەجرىبە";


    NSArray *controllerArray = @[controller3,controller2,controller1];
    NSDictionary *parameters = @{
                                 CAPSPageMenuOptionScrollMenuBackgroundColor: [UIColor whiteColor],
                                 CAPSPageMenuOptionSelectedMenuItemLabelColor: [UIColor blueColor],CAPSPageMenuOptionUnselectedMenuItemLabelColor:[UIColor colorWithRed:0.20 green:0.20 blue:0.20 alpha:1.00],
                                 CAPSPageMenuOptionViewBackgroundColor: [UIColor whiteColor],
                                 CAPSPageMenuOptionSelectionIndicatorColor: [UIColor blueColor],
                                 CAPSPageMenuOptionBottomMenuHairlineColor: [UIColor whiteColor],
                                 CAPSPageMenuOptionMenuItemFont: [UIFont systemFontOfSize:18],
                                 CAPSPageMenuOptionMenuHeight: @(40.0),
                                 CAPSPageMenuOptionMenuItemWidth: @(70.0),
                                 CAPSPageMenuOptionCenterMenuItems: @(YES),
                                 };

    _pageMenu = [[CAPSPageMenu alloc] initWithViewControllers:controllerArray frame:CGRectMake(0.0, 64, self.view.frame.size.width, self.view.frame.size.height) options:parameters];

    _pageMenu.delegate = self;

    //If the viewcontroller total number is X, you should change moveToPage:2 to moveToPage:X-1, so you need just replace **X-1**** to yours
    [_pageMenu moveToPage:2 withAnimated:NO];
    [self.view addSubview:_pageMenu.view];```

pagemenu-rtl's People

Stargazers

Erbash avatar uyghurbeg avatar

Watchers

James Cloos avatar

Forkers

maskmale

pagemenu-rtl's Issues

need to swift version

Hello,
thanks for convert plugin to RTL, but i'm using Swift for it not objective-c, do you know how to convert the plugin to RTL in swift ?

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.