Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.02 KB

README.md

File metadata and controls

38 lines (23 loc) · 1.02 KB

CustomSegmentedControl

A customized segmented control on Objective-C.

Requirements

Xcode 6 or later.

Manual Install

All you need to do is drop Source folder into your project and include headers.

Configure SegmentedControl in code

NSArray *arr = [NSArray arrayWithObjects: @"Trending", @"Random", @"Search", nil];
segmentControl = [[GIFSegmentedControl alloc] initWithFrame:CGRectMake(0, 0, 250, 30)];
segmentControl.items = arr;
segmentControl.selectedIndex = 0;
[segmentControl addTarget:self action:@selector(segmentValueChanged:) forControlEvents:UIControlEventValueChanged];

With Storyboards

Add UIView to Storyboard

alt tag

Select class:

alt tag

Setup Segmented Control:

alt tag

Result

alt tag