Latest 0.1.1
Homepage https://github.com/ugurcetinkaya/UURCCentralizedTokenView
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

[![CI Status](http://img.shields.io/travis/Ugur Cetinkaya/UURCCentralizedTokenView.svg?style=flat)](https://travis-ci.org/Ugur Cetinkaya/UURCCentralizedTokenView)
Version
License
Platform

Example

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

Installation

Manaully

Add UURCCentralizedTokenView.h and UURCCentralizedTokenView.m files to your project.

CocoaPods

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

pod 'UURCCentralizedTokenView'

Usage

Import the UURCCentralizedTokenView library to your ViewController.

#import <UURCCentralizedTokenView/UURCCentralizedTokenView.h>

Create an instance UURCCentralizedTokenView class with token array. Then, set style of UURCCentralizedTokenView UI object.

self.tokenView = [[UURCCentralizedTokenView alloc] initWithTokenArray:tokenArray];
self.tokenView.parentViewController = self;
[self.view addSubview:self.tokenView];

// set token view Style
self.tokenView.tokenEdgeInsets = UIEdgeInsetsMake(8, 10, 8, 10);
self.tokenView.unselectedTokenTitleColor = [UIColor colorWithRed:0.72 green:0.11 blue:0.11 alpha:1.0];
self.tokenView.selectedTokenTitleColor = [UIColor colorWithRed:0.72 green:0.11 blue:0.11 alpha:1.0];
self.tokenView.selectedTokenColor = [UIColor colorWithRed:1.00 green:0.94 blue:0.67 alpha:1.0];
self.tokenView.selectedTokenBorderColor = [UIColor colorWithRed:1.00 green:0.94 blue:0.67 alpha:1.0];
self.tokenView.unselectedTokenBorderColor = [UIColor colorWithRed:0.72 green:0.11 blue:0.11 alpha:1.0];

You can detect selected token with UURCCentralizedTokenViewDelegate delegate method which is actionToken.

- (void)actionToken:(NSNumber *)tokenIndex {
    [self.tokenView setTokenSelected:tokenIndex];
    NSLog(@"%@",tokenIndex);
}

Author

Ugur Cetinkaya, ugurcetinkaya@ymail.com

License

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

Latest podspec

{
    "name": "UURCCentralizedTokenView",
    "version": "0.1.1",
    "summary": "Customizable Centralized TokenView",
    "description": "Customizable Centralized TokenView for iOS applications.",
    "homepage": "https://github.com/ugurcetinkaya/UURCCentralizedTokenView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ugur Cetinkaya": "ugurcetinkaya@ymail.com"
    },
    "source": {
        "git": "https://github.com/ugurcetinkaya/UURCCentralizedTokenView.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/ceuur",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "UURCCentralizedTokenView/Classes/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This