• Stars
    star
    299
  • Rank 139,269 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An animate switch collection, Add Beautiful Customise Switch in your application to boost UI and UX

Switches Animations

An animated switch collection

CI Status Carthage Compatible Swift 5.1

Add Beautiful Customise Switch in your application to enhance your application UI and UX


Medium Article:

https://medium.com/@l060214/how-to-create-loading-uiswitch-with-calayers-and-caanimations-4667c1fa845


From time to time I browse Dribbble to get inspiration from UI/UX designers. You often see non-native control elements in these designs. Some, such as checkboxes, have no native counterpart in UIKit while others like switches are— except they’re nearly impossible to customize. You cannot even change the size of a UISwitch. What if you need to implement a completely custom designed switch for your app like this one

If you wanted to implement any of these designs it would be a poor choice to subclass UISwitch as you can hardly customize the colours — aside from the on/off tint. So I thought I would try to re-engineer the UISwitch so that I would have complete control over each aspect, making it easy to style in the future.Turns out its actually pretty easy (and a lot of fun!) to build these control elements from scratch. I even went so far as to add the ability to set on/off text or images. For those who don’t know, UISwitch has onImage and offImage which when set don’t do anything anymore.

So i take few of the Dribble switches Daily UI challenges as challenge and implemented them in this library.This library has cool and sophisticated animations,Designs and effects. Also, customizable properties can be tweaked behaviors and enhance your application UI cool. With this library, you can easily implement material design switch to your app.

You can play with the attributes and can customise them according to your UI demands. Below are the few examples

Usage example

Class Example
Switcher Dribble UI Challenge: https://dribbble.com/shots/4148855-Switcher-XXXIII
SwitcherFullStrtech Dribble UI Challenge:https://dribbble.com/shots/3844909-On-Off
SDSwitch Dribble UI Challenge:https://dribbble.com/shots/3545882-Switch-with-server-calls
YapDarkAndLightModeSwitch Dribble UI Challenge:https://dribbble.com/shots/2484722-Daily-Ui-Day-15-On-Off-Switch
YapAnimatedSwitch Dribble UI Challenge:https://dribbble.com/shots/2309834-Yet-another-toggle-animation
SDSwitch Dribble UI Challenge:https://dribbble.com/shots/5192899-Simple-toggle
YapFullTextSwitch Dribble UI Challenge:https://dribbble.com/shots/2330566-Morph-Switch
JDSwitch Dribble UI Challenge:https://dribbble.com/shots/2346044-Switch-on-off
YapSmileSwitch Dribble UI Challenge:https://dribbble.com/shots/2011284-Switcher-ll
YapLiquidSwitch Dribble UI Challenge:https://dribbble.com/shots/2028065-Switcher-lll
YapSwitchSlim Dribble UI Challenge:https://dribbble.com/shots/2158763-simple-toggle
YapGradientSwitch Dribble UI Challenge:https://dribbble.com/shots/2603107-toggle-switch-micro-interaction
YapHalfStretchSwitch
YapSwitch
YapFullStretchSwitch
YapSwitch

Requirements

  • iOS 10.0+ / Mac OS X 10.9+ / watchOS 2.0+ / tvOS 9.0+
  • Xcode 8.0+

Installation

CocoaPods

To integrate Switches Animations into your Xcode project using CocoaPods, specify it in your Podfile:

use_frameworks!

pod 'Switches'

Then, run the following command:

$ pod install

Swift Package Manager (SPM)

Prerequisites

  • OSX

Update Package.swift

To integrate Switches Animations in your project, add the proper description to your Package.swift file:

// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    dependencies: [
        .package(url: "https://github.com/jwd-ali/Switch-Animations.git")
    ],
    targets: [
        .target(
            name: "YOUR_TARGET_NAME",
            dependencies: ["Switch-Animations"]
        ),
        ...
    ]
)

Carthage

To integrate Switches Animations into your Xcode project using Carthage, specify it in your Cartfile:

github "jwd-ali/Switch-Animations"

Manually

If you prefer not to use a dependency manager, you can integrate Switches Animations into your project manually.

  • Add Sources folder into your project

Integration

See the Demo Xcode project its easy to understand with proper comments on properties .. write me if you didn't get anything [email protected]

Be careful!!!

Irreversible consequences are possible during long work with the framework.

Contributing

I’d love to have help on this project. For small changes please open a pull request, for larger changes please open an issue first to discuss what you’d like to see.

License

Switch-Animations is under MIT. See LICENSE file for more info.

More Repositories

1

RingPieChart

If you want to add circular pie chart in your application then RingPieChart can be a good choice containing number of animations and its Easy to use framework
Swift
37
star
2

JDTabBarController

JDTabBarController is Light way to add Fancy bottom bar which gives you Simple Animated tab Bar with native control. Created using CAShapeLayer and UIBezierPath with CABasicAnimation and CASpringAnimation
Swift
35
star
3

JDAnimatedTextField

Animated Subclass of UITextField created with CABasicAnimation and CAShapeLayer
Swift
30
star
4

JDTextField

Animated UITextField enhance UX for the user by giving clarity that they are focused
Swift
26
star
5

Dater

Swift
25
star
6

LiquidTabBarController

LiquidTabBarController is Light way to add Fancy bottom bar which gives you Simple Animated tab Bar with native control.. Created using CAShapeLayer and UIBezierPath with CABasicAnimation
Swift
20
star
7

JDAlertController

JDAlertController is AlertController replica that can significantly enhance your users experiences and set your app apart from the rest of the pack. You don’t need to do much to integrate it.Its build using UIViewControllerTransitioningDelegate and UIPresentationController having four types of UIViewControllerAnimatedTransitioning animations and many more customisations with different buttons styles and UITextField support as well
Swift
17
star
8

JProgressView

Add Progress Animation in just 2 steps in your view developed using CAShapelayer and UIBezierPath drawing with CABasicAnimation.
Swift
15
star
9

IOS-Portfolio

A visual portfolio of my latest iOS projects.
14
star
10

WifiView

WifiView Pod can animate wifi signal strength
Swift
14
star
11

GraphView

Draw graph using UIBezierpath with CAShapeLayer , CAGradientLayer and CALayer. Move fingers on graph using gesture. I am using LongPressGesture in this respostry with custom implemented popUpView
Swift
12
star
12

ZigProgressView

Add zigzag Progress Animation in just 2 steps in your view developed using CAShapelayer and UIBezierPath drawing with CABasicAnimation.
Swift
11
star
13

SpinnerAnimation

Swift
11
star
14

JDCircularProgress

Circular progress Animation
Swift
9
star
15

PopUpManager

iOS reusable popups and alerts presentation
Swift
9
star
16

RProgressView

This animation is inspired from #Reddit application i downloaded few days back and love its progress view. so i try to implement that with number of customisations options. You can add as many number of circles you want ... You can have multicolour progress view also speed and width of circles are also customisable
Swift
9
star
17

Drag3DRotateCard

Drag card with finger to see its both sides
Swift
8
star
18

BarLoading

Sometimes simplicity attracts you. Color Fill Loading animation is between those Bar loading animations
Swift
8
star
19

WeatherExercise

Get Weather using darksky Api built in MVVM Repository Pattern
Swift
7
star
20

TidalTestProject

This is Test Project written in Swift using MVVM(C) Architecture
Swift
6
star
21

MobileExtercise

iOS Mobile exercise created in MVVM Architecture using Repository layer...
Swift
6
star
22

KTChallenge

Combine + MVVM
Swift
6
star
23

DiffableDataSource

Diffable data sources dramatically simplify the work involved in managing and updating collection and table views to create dynamic and responsive experiences in your apps
Swift
6
star
24

SoundTest

MVVM(C) with combine
Swift
5
star
25

CircularLabel

Swift
5
star
26

ProgressImageView

Progress image view to show progress around image
Swift
5
star
27

ShiftAnimation

Swift
5
star
28

CircularAnimation

Swift
5
star
29

HelloTest

Take home task from one company developed on VIPER, UI Through code and splash from plist
Swift
5
star
30

PayPayChallenge

Swift
4
star
31

Circular

4
star
32

DragableCollectionView

Swift
4
star
33

Wishlists

Swift
3
star
34

jwd-ali

Its all about me .. To check out more see my repositories or my Portfolio
3
star
35

UniqueAnimation

Swift
3
star
36

TidalAssignment

Swift
3
star