Latest0.0.1
Homepagehttps://github.com/rcgary/RCRunkeeperSwitch
LicenseMIT
Platformsios 7.0, requires ARC
Authors

A Objective C impltation for Runkeeper design switch control, it is a clone from DGRunkeeperSwitch

alt tag
alt tag

Requirements

  • iOS 7.0 or higher (May work on previous versions, just did not test it. Feel free to edit it).
  • ARC

Demo

Open and run the RCRunkeeperSwitchDemo.xcodeproj in Xcode to see RCRunkeeperSwitch in action.

Installation

Cocoapod

pod 'RCRunkeeperSwitch'

Manual

All you need to do is drop RCRunkeeperSwitch.h and RCRunkeeperSwitch.m file into your project

Example usage

RCRunkeeperSwitch *runkeeperSwitch = [[RCRunkeeperSwitch alloc]initWithLeftTitle:@"Feed" rightTitle:@"Leaderboard"];
runkeeperSwitch.backgroundColor = [UIColor colorWithRed:239.0/255.0 green:95.0/255.0 blue:49.0/255.0 alpha:1.0];
runkeeperSwitch.selectedBackgroundColor = [UIColor whiteColor];
runkeeperSwitch.titleColor = [UIColor whiteColor];
runkeeperSwitch.selectedTitleColor = [UIColor colorWithRed:239.0/255.0 green:95.0/255.0 blue:49.0/255.0 alpha:1.0];
runkeeperSwitch.titleFont = [UIFont fontWithName:@"HelveticaNeue-Medium" size:13];
runkeeperSwitch.frame = CGRectMake(50, 20, CGRectGetWidth(self.view.bounds) - 100, 30);
runkeeperSwitch.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.view addSubview:runkeeperSwitch];

Contribution

You are welcome to fork and submit pull requests!

Latest podspec

{
    "name": "RCRunkeeperSwitch",
    "version": "0.0.1",
    "summary": "A Objective C impltation for Runkeeper design switch control, it is a clone from DGRunkeeperSwitch",
    "description": "A Objective C impltation for Runkeeper design switch control, it is a clone from [DGRunkeeperSwitch](https://github.com/gontovnik/DGRunkeeperSwitch)",
    "homepage": "https://github.com/rcgary/RCRunkeeperSwitch",
    "screenshots": [
        "https://raw.githubusercontent.com/rcgary/RCRunkeeperSwitch/master/RCRunkeeperSwitch.png",
        "https://raw.githubusercontent.com/rcgary/RCRunkeeperSwitch/master/RCRunkeeperSwitch.gif"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Chao Ruan": "[email protected]"
    },
    "social_media_url": "http://twitter.com/chaoruan",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/rcgary/RCRunkeeperSwitch.git",
        "tag": "0.0.1"
    },
    "source_files": "RCRunkeeperSwitch/**/*.{h,m}",
    "ios": {
        "frameworks": [
            "UIKit",
            "Foundation"
        ]
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This