JTMaterialSwitch alternatives and similar libraries
Based on the "Switch" category.
Alternatively, view JTMaterialSwitch alternatives based on common mentions on social networks and blogs.
-
HMSegmentedControl
A highly customizable drop-in replacement for UISegmentedControl. -
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 -
BetterSegmentedControl
An easy to use, customizable replacement for UISegmentedControl & UISwitch. -
TwicketSegmentedControl
Custom UISegmentedControl replacement for iOS, written in Swift -
TKSwitcherCollection
An animation switch collection -
AIFlatSwitch
Nicely animated flat design switch alternative to UISwitch -
SJFluidSegmentedControl
A segmented control with custom appearance and interactive animations. Written in Swift 3.0. -
PinterestSegment
A Pinterest-like segment control with masking animation. -
AKASegmentedControl
๐ซ Fully customizable Segmented Control for iOS -
LUNSegmentedControl
Customizable segmented control with interactive animation. -
MultiSelectSegmentedControl
UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images. -
ViralSwitch
A UISwitch that infects its superview with its tint color. -
DynamicMaskSegmentSwitch
A segment switcher with dynamic text mask effect -
AnimatedSwitch
UISwitch which paints over the parent view with the color in Swift. -
Switcher
Swift - Custom UISwitcher with animation when change status -
Switch
๐ An iOS switch control implemented in Swift with full Interface Builder support -
YUSegment
A customizable Segmented Control for iOS. Supports text and image.
Appwrite - The Open Source Firebase alternative introduces iOS support
* 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 JTMaterialSwitch or a related project?
README
[JTMaterialSwitch](Docs/JTMaterialSwitch_Title.png)
Overview
JTMaterialSwitch
is google's material design like switch UI with animation features.
This library has cool and sophisticated animations, ripple effect and bounce effect. 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.
Installation
JTMaterialSwitch
is available on CocoaPods.
You can use this library by adding the following command onto your Podfile:
pod "JTMaterialSwitch"
Usage
The simplest setup:
JTMaterialSwitch *switch = [[JTMaterialSwitch alloc] init];
switch.center = CGPointMake(200, 200);
[self.view addSubview:switch];
This is the simplest and easiest initialization.
The style, size and initial state of JTMaterialSwitch
instance is set to all default value as shown below.
In addition, this library also has following designated initializers to set these parameters.
/**
* Initializes a JTMaterialSwitch with a initial switch state position and size.
*
* @param size A JTMaterialSwitchSize enum as this view's size(big, normal, small)
* @param state A JTMaterialSwitchState enum as this view's initial switch pos(ON/OFF)
*
* @return A JTMaterialSwitch with size and initial position
*/
- (id)initWithSize:(JTMaterialSwitchSize)size state:(JTMaterialSwitchState)state;
/**
* Initializes a JTMaterialSwitch with a initial switch size, style and state.
*
* @param size A JTMaterialSwitchSize enum as this view's size(big, normal, small)
* @param state A JTMaterialSwitchStyle enum as this view's initial style
* @param state A JTMaterialSwitchState enum as this view's initial switch pos(ON/OFF)
*
* @return A JTMaterialSwitch with size, style and initial position
*/
- (id)initWithSize:(JTMaterialSwitchSize)size style:(JTMaterialSwitchStyle)style state:(JTMaterialSwitchState)state;
Customize Behaviors
JTMaterialSwitch has many prateters to customize behaviors as you like.
Style and size
Style: JTMaterialSwitchStyle
- JTMaterialSwitchStyleLight
- JTMaterialSwitchStyleDark
- JTMaterialSwitchStyleDefault
Size: JTMaterialSwitchSize
- JTMaterialSwitchSizeBig
- JTMaterialSwitchSizeNormal
- JTMaterialSwitchSizeSmall
[Screen shot](Docs/style_and_size.gif)
Properties
#pragma State
/** A Boolean value that represents switch's current state(ON/OFF). YES to ON, NO to OFF the switch */
@property (nonatomic) BOOL isOn;
/** A Boolean value that represents switch's interaction mode. YES to set enabled, No to set disabled*/
@property (nonatomic) BOOL isEnabled;
/** A Boolean value whether the bounce animation effect is enabled when state change movement */
@property (nonatomic) BOOL isBounceEnabled;
/** A Boolean value whether the ripple animation effect is enabled or not */
@property (nonatomic) BOOL isRippleEnabled;
#pragma Color
/** An UIColor property to represent the color of the switch thumb when position is ON */
@property (nonatomic, strong) UIColor *thumbOnTintColor;
/** An UIColor property to represent the color of the switch thumb when position is OFF */
@property (nonatomic, strong) UIColor *thumbOffTintColor;
/** An UIColor property to represent the color of the track when position is ON */
@property (nonatomic, strong) UIColor *trackOnTintColor;
/** An UIColor property to represent the color of the track when position is OFF */
@property (nonatomic, strong) UIColor *trackOffTintColor;
/** An UIColor property to represent the color of the switch thumb when position is DISABLED */
@property (nonatomic, strong) UIColor *thumbDisabledTintColor;
/** An UIColor property to represent the color of the track when position is DISABLED */
@property (nonatomic, strong) UIColor *trackDisabledTintColor;
/** An UIColor property to represent the fill color of the ripple only when ripple effect is enabled */
@property (nonatomic, strong) UIColor *rippleFillColor;
[Screen shot](Docs/bounce_ripple_enabled.gif)
Change History
1.1 Bug Fix
1.0.0 Initial Release
Requirements
iOS 7.0 or later
Author
Junichi Tsurukawa [email protected]
License
JTMaterialSwitch is available under the MIT license.
*Note that all licence references and agreements mentioned in the JTMaterialSwitch README section above
are relevant to that project's source code only.