CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Nov 2016 |
Maintained by Oya Said.
A customizable control based on the UISwitch writen in Objective C inspired by the DVSwitch
First import!
#import "OSwitch/OSwitch.h"The control can be added in the storyboard/nib or programmatically.
OSwitch *oSwitch = [[OSwitch alloc] initWithFrame:CGRectMake(0, 300, 300, 40)];
[self.view addSubview:oSwitch];oSwitch.delegate = self;- (NSArray *)titlesInSwitch:(OSwitch *)switchView {
//TODO: return list of titles for the control here
return titles;
}
- (void)switchView:(OSwitch *)switchView valueDidChangeAtIndex:(NSUInteger)index {
//TODO: do stuff here
}You can customize bunch of stuff: