Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SPStore/SPMultipleSwitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

10 Commits

Repository files navigation

SPMultipleSwitch

image

CocoaPods

pod "SPMultipleSwitch", "~> 1.0"

Use

 SPMultipleSwitch *multipleSwitch = [[SPMultipleSwitch alloc] initWithItems:@[@"Feed",@"Leaderboard"]];
 multipleSwitch.frame = CGRectMake(30, 100, ScreenW-60, 40);
 multipleSwitch.backgroundColor = [UIColor orangeColor];
 multipleSwitch.selectedTitleColor = [UIColor orangeColor];
 multipleSwitch.titleColor = [UIColor whiteColor];
 multipleSwitch.trackerColor = [UIColor whiteColor];
 multipleSwitch.contentInset = 5;
 multipleSwitch.spacing = 10;
 multipleSwitch.titleFont = [UIFont boldSystemFontOfSize:17];
 multipleSwitch.trackerColor = [UIColor whiteColor];
 [multipleSwitch addTarget:self action:@selector(multipleSwitchAction:) forControlEvents:UIControlEventTouchUpInside];
 [self.view addSubview:multipleSwitch];

Swift版

DGRunkeeperSwitch

About

类似segment功能,label混合显示,全网OC版本第一例,简书地址:

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /