To run the example project, clone the repo, and run pod install
from the Example directory first.
GSToggleSwitch is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'GSToggleSwitch', '~> 0.3'
You can simply set all the properties in simple way
toggleSwitch.set(
properties: { prop in
prop.width = 40
prop.height = 20
prop.cornerRadius = 10
prop.onBackgroundColor = .green
prop.thumbProperties.showThumbShadow = true
prop.thumbProperties.backgroundColor = .white
},
tapOnSwitch: { [weak self] in
guard let self = self else { return .off }
return self.toggle1.currentState
}
)
Gaganjot Singh(megaganjotsingh@gmail.com)
GSToggleSwitch is available under the MIT license. See the LICENSE file for more info.