Skip to content

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

Notifications You must be signed in to change notification 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