CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

CustomSegmentedControl 0.0.2

CustomSegmentedControl 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Ardelean Madalina.



  • By
  • Madalina Ardelean

MACustomSegmentedControl

A custom segmented control, with rectangular segments.

Installation

Drag and drop MACustomSegmentedControlView.h/m into your project.

Usage

CGRect frame = CGRectMake(0.0, 0.0, CGRectGetWidth(self.view.bounds), 100);
MACustomSegmentedControlView *segmentedControlView = [[MACustomSegmentedControlView alloc] initWithFrame:frame andItems:@[@"One", @"Two", @"Three", @"Four"]];
segmentedControlView.delegate = self;
segmentedControlView.title = @"Segmented control example";
[segmentedControlView setNumberOfSegmentsInLine:4 forOrientation:UIInterfaceOrientationMaskLandscape];
[segmentedControlView setNumberOfSegmentsInLine:2 forOrientation:UIInterfaceOrientationMaskPortrait];

[self.view addSubview:segmentedControlView];

Screenshot

Screenshot