Custom-Shaped Switch in iOS Apps
Once I got a rather simple-looking task from a regular client of mine: he needed to make a screen for an iOS app with several switches. The switch was long and thin. It was different from both the UISwitch, which has size 51x31 points, and the Material switch, which is more flexible in size, but the thumb is bigger than the track.
I found many solutions on GitHub, but they were either modifications of existing UISwitch, or variations of Material switch. Other options didn’t look like switches at all.
I’ll give some references, in case you’re looking for something different:
- AIFlatSwitch — the switch looks more like an animated checkbox.
- MJMaterialSwitch —an iOS implementation of the Android Material Switch.
- LabelSwitch — the closest switch to what I was looking for. Longer than the standard one, with text on top. Unfortunately, it didn’t work when I tested it.
- TTSwitch — a very old switch, circular or rectangular.
- PWSwitch — an animated flat switch with a rather interesting design.
- Paper Switch —a standard iOS switch, but with an interesting effect on its superview.
- TKSwitcherCollection — a whole collection of different switch components.
- SwiftySwitch — a…