All Projects → Ramotion → Paper Switch

Ramotion / Paper Switch

Licence: mit
🎚 RAMPaperSwitch is a Swift material design UI module which paints over the parent view when the switch is turned on. iOS library by @Ramotion

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Paper Switch

React Native X Bar
🎩 A flexible, lightweight bar component for common UI patterns in React Native
Stars: ✭ 68 (-97.66%)
Mutual labels:  library, component
Geotic
Entity Component System library for javascript
Stars: ✭ 97 (-96.66%)
Mutual labels:  library, component
Wymaterialbutton
Interactive and fully animated Material Design button for iOS developers.
Stars: ✭ 80 (-97.24%)
Mutual labels:  library, component
Hellobooks
A Single-Page Library Management App built with nodejs, express and react and redux
Stars: ✭ 37 (-98.73%)
Mutual labels:  library, component
Garland View Android
≡ GarlandView seamlessly transitions between multiple lists of content. Made by @Ramotion
Stars: ✭ 1,855 (-36.08%)
Mutual labels:  library, component
Pannellum React
React Component for Pannellum (open source panorama viewer for the web)
Stars: ✭ 48 (-98.35%)
Mutual labels:  library, component
React Markdown
Markdown editor (input) based on React
Stars: ✭ 98 (-96.62%)
Mutual labels:  library, component
Folding Cell Android
📃 FoldingCell is a material design expanding content cell inspired by folding paper material made by @Ramotion
Stars: ✭ 4,859 (+67.44%)
Mutual labels:  library, component
Aura.ui
A Library with a lot of Controls for AvaloniaUI
Stars: ✭ 114 (-96.07%)
Mutual labels:  library, component
Styled Typography
Typograpy components for react and styled-components
Stars: ✭ 113 (-96.11%)
Mutual labels:  library, component
Egjs
Javascript components group that brings easiest and fastest way to build a web application in your way.
Stars: ✭ 871 (-69.99%)
Mutual labels:  library, component
Navigation Stack
NavigationStack is a stack-modeled UI navigation controller. Swift UI library made by @Ramotion
Stars: ✭ 2,289 (-21.12%)
Mutual labels:  library, component
Expanding Collection
ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
Stars: ✭ 5,456 (+88.01%)
Mutual labels:  library, component
Faboptions
A multi-functional FAB component with customizable options
Stars: ✭ 1,060 (-63.47%)
Mutual labels:  library, component
Vuesax
New Framework Components for Vue.js 2
Stars: ✭ 5,293 (+82.39%)
Mutual labels:  library, component
Ngx Select Dropdown
Custom Dropdown for Angular 4+ with multiple and single selection options
Stars: ✭ 91 (-96.86%)
Mutual labels:  library, component
React Native Blurhash
🖼️ A library to show colorful blurry placeholders while your content loads.
Stars: ✭ 430 (-85.18%)
Mutual labels:  library, component
Ngx Ui
🚀 Style and Component Library for Angular
Stars: ✭ 534 (-81.6%)
Mutual labels:  library, component
Maz Ui
Stand-alone components library to build your interfaces with Vue.JS & Nuxt.JS
Stars: ✭ 109 (-96.24%)
Mutual labels:  library, component
React Trading Ui
Component library for trading applications 😰📉💸
Stars: ✭ 166 (-94.28%)
Mutual labels:  library, component

PAPER SWITCH

A Swift material design UI module which paints over the parent view when the switch is on.


We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Stay tuned for the latest updates:


CocoaPods CocoaPods CocoaPods Carthage compatible Twitter Travis Donate

Requirements

  • iOS 8.0+
  • Xcode 9.0+

Installation

Just add the RAMPaperSwitch folder to your project.

or use CocoaPods with Podfile:

pod 'RAMPaperSwitch' 

or Carthage users can simply add to their Cartfile:

github "Ramotion/paper-switch"

Usage

RAMPaperSwitch is a drop-in replacement of UISwitch. You just need to set the onTintColor property of the switch, and it will automatically paint over its superview with the selected color. You have ability to set duration of animation instead of default value.

  1. Create a new UISwitch in your storyboard or nib.

  2. Set the class of the UISwitch to RAMPaperSwitch in your Storyboard or nib.

  3. Set onTintColor for the switch

  4. Set duration property programmatically if You want to change animation duration.

  5. Add animation for other views near the switch if need.

Animate views

You can animate other views near the switch. For example, you can change color to views or labels that are inside the same superview. Duration of animation can be gotten from the RAMPaperSwitch's property duration. You can animate CoreAnimation properties like this:

self.paperSwitch.animationDidStartClosure = {(onAnimation: Bool) in
    UIView.transitionWithView(self.label, duration: self.paperSwitch.duration, options: UIViewAnimationOptions.TransitionCrossDissolve, animations: {
        self.label.textColor = onAnimation ? UIColor.whiteColor() : UIColor.blueColor()
    }, completion:nil)
}

📄 License

Paper Switch is released under the MIT license. See LICENSE for details.

This library is a part of a selection of our best UI open-source projects.

If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com

📱 Get the Showroom App for iOS to give it a try

Try this UI component and more like this in our iOS app. Contact us if interested.



Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].