How jaleelnazir/mjmaterialswitch works
MJMaterialSwitch is a small UIKit control library that provides a customizable, animated material-style switch. The principal workflow is user interaction with the switch, which updates its on/off state and appearance and emits a value-changed event for the host app to handle. The demo view controller shows both a storyboard outlet and a programmatically created switch. Ripple and bounce are documented capabilities; the excerpts show their implementation lives in the control, but omit some details, so the graph keeps them within that component.
Main entry points: MJMaterialSwitch.swift Material switch · ViewController.swift Demo controller
Components 3
Switch control
- Material switch
MJMaterialSwitch/MJMaterialSwitch.swift
Demo app
- Demo controller
MJMaterialSwitch/ViewController.swift
Other components
- User
Connections 3
- User → Material switch: interacts with
README.md - Material switch → Demo controller: sends value-changed
MJMaterialSwitch/MJMaterialSwitch.swift - Demo controller → Material switch: configures and observes
MJMaterialSwitch/ViewController.swift