AnimatedSwitch alternatives and similar libraries
Based on the "Switch" category.
Alternatively, view AnimatedSwitch alternatives based on common mentions on social networks and blogs.
-
RAMPaperSwitch
:octocat: ๐ RAMPaperSwitch is a Swift material design UI module which paints over the parent view when the switch is turned on. iOS library by @Ramotion -
SJFluidSegmentedControl
A segmented control with custom appearance and interactive animations. Written in Swift 3.0. -
MultiSelectSegmentedControl
UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AnimatedSwitch or a related project?
README
AnimatedSwitch
Swift subclass of the UISwitch which paints over the parent view with the color
if switch is turned on and returns original superview background color if switch is off.
Inspired by concept from this Dribbble
Screenshot
[AnimatedSwitch](animation2.gif)
Requirements
- Swift 3.2
- iOS 9.3+
- Xcode 7.3+
Installation
Copy AnimatedSwitch.swift
to your project. Copy file if needed.
Usage
AnimatedSwitch adds nice material-design-like animation to your UISwitch.
AnimatedSwitch uses custom color for state on
and superview background color for state off
When activated fills super view area with circle shape of specific color
How to create
Programatically
let switch = AnimatedSwitch()
Storyboard and XIB
- Drap and drop a new UISwitch
- Set the class of the UISwitch to AnimatedSwitch
- Set
color
for the switch - Set other parameters
[Interfacebuilder](InterfaceBuilder.png)
Configurable properties (in code and in Interface Builder)
All regular UISwitch
color
animation color foron
state (off
state usessuperview.backgroundColor
). Default.clearColor()
animationDuraton
how long AnimatedSwitch will draw circle to fill the superview frame. Default0.25
startRadius
circle radius that will be shown on screen without animation. Default15
(to fit UISwitch size)borderColor
border color foron
state. Default.colorWhite
showBorder
should border appear around UISwitch foron
state. Defaulttrue
shape
filling shape:.Round
,.Star
,.Dimond
or.Cusom(UIBezierPath)
. Default.Round
(NB! Can be set in code only)
Callbacks
Animation started
let switch = AnimatedSwitch()
switch.animationDidStart = {
// do something
}
Animation Finished
switch.animationDidStop = {
// do something
}
About
I made this switch to practice my skills in animation.
The implementation inspired by Marin Todorov book iOS Animations by Tutorials and Ramotion Inc. animation on Dribble. Please note that this Ramotion Inc. provided their own implementation, but it uses another approach for animation.