Steven b255add1b7 替换icon,网络教室初改版 | 4 years ago | |
---|---|---|
.. | ||
HMSegmentedControl | 4 years ago | |
LICENSE.md | 4 years ago | |
README.md | 4 years ago |
A drop-in replacement for UISegmentedControl mimicking the style of the segmented control used in Google Currents and various other Google products.
The easiest way of installing HMSegmentedControl is via CocoaPods.
pod 'HMSegmentedControl'
HMSegmentedControl.h
and HMSegmentedControl.m
to your project.QuartzCore.framework
to your linked frameworks.#import "HMSegmentedControl.h"
where you want to add the control.The code below will create a segmented control with the default looks:
HMSegmentedControl *segmentedControl = [[HMSegmentedControl alloc] initWithSectionTitles:@[@"One", @"Two", @"Three"]];
segmentedControl.frame = CGRectMake(10, 10, 300, 60);
[segmentedControl addTarget:self action:@selector(segmentedControlChangedValue:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:segmentedControl];
Included is a demo project showing how to fully customise the control.
If you are using HMSegmentedControl in your app or know of an app that uses it, please add it to this list.
HMSegmentedControl is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
If this code was helpful, I would love to hear from you.