A Collection of Animated Switches
I occasionally peruse Dribbble to for UI/UX designer ideas. Non-native control elements are frequently used in these designs. Some, like checkboxes, don’t have a natural analogue in UIKit, whereas switches do— with the exception that they’re incredibly difficult to customise. A UISwitch cannot even be made larger. What if you have to use a switch that was entirely specifically created for your programme, like this one?
It wouldn’t be a good idea to subclass UISwitch if you wanted to apply any of these designs because you can’t really change the colours much other than the on/off tint. I then decided to try to redesign the UISwitch so that I could have total control over every feature and make it simple to style in the future.
It wouldn’t be a good idea to subclass UISwitch if you wanted to apply any of these designs because you can’t really change the colours much other than the on/off tint. So I decided to try re-engineering the UISwitch to give me total control over every feature and make it simple to style in the future.It turns out that creating these control elements from scratch is actually rather simple (and a lot of fun!). I even added the option to turn on or off text or graphics. For those who are unaware, UISwitch provides two options: onImage and offImage, which, when set, have no further effect.
As a result, I incorporated a few of the Dribble switches Daily UI tasks in this module.Cool and sophisticated animations, designs, and effects may be found in this library. Additionally, you can modify behaviours and make your application’s UI cooler by using customisable settings. With the help of this library, adding a material design switch to your app is simple.
You can experiment with the properties and alter them to suit your UI requirements. Here are a few instances:
Usage example of Switch Animations
- iOS 10.0+ / Mac OS X 10.9+ / watchOS 2.0+ / tvOS 9.0+
- Xcode 8.0+
To integrate Switches Animations into your Xcode project using CocoaPods, specify it in your
Next, execute the given command.
$ pod install
Switches Animations in your project, add the proper description to your
let package = Package(
Switches Animations must be specified in your Cartfile in order to be included in your Xcode project using Carthage:
If you prefer not to use a dependency manager, you can integrate Switches Animations into your project manually.
- Include the Sources folder in your project.
See the Demo Xcode project its easy to understand with proper comments on properties .