Latest 0.3.0
Homepage https://github.com/xuliang2015/XSegmentControl
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

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

Installation

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

pod 'XSegmentControl'

Usage

// 1. create
_segControl = [[XSegmentControl alloc] initWithFrame:CGRectMake(0, 100, 375, 44)];
_segControl.delegate = self;
_segControl.separatorColor = [UIColor clearColor];
_segControl.selectedColor = [UIColor orangeColor];
_segControl.unselectedColor = [UIColor grayColor];
_segControl.titleFont = [UIFont boldSystemFontOfSize:20];
[_segControl setItemTitles:@[@"hello", @"world"]];
[self.view addSubview:_segControl];
......

// 2. delegate
#pragma mark - XSegmentControlDelegate
- (BOOL)segmentControlWillSelectItemAtIndex:(NSInteger)index
{
    return YES;
}

- (void)segmentControlDidSelectItemAtIndex:(NSInteger)index
{

}

Author

xuliang2015, [email protected]

License

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

Latest podspec

{
    "name": "XSegmentControl",
    "version": "0.3.0",
    "summary": "A short description of XSegmentControl.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/xuliang2015/XSegmentControl",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "xuliang2015": "[email protected]"
    },
    "source": {
        "git": "https://github.com/xuliang2015/XSegmentControl.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "XSegmentControl/Classes/**/*"
}

Pin It on Pinterest

Share This