开源软件名称(OpenSource Name):Ramotion/paper-switch开源软件地址(OpenSource Url):https://github.com/Ramotion/paper-switch开源编程语言(OpenSource Language):Swift 93.7%开源软件介绍(OpenSource Introduction):PAPER SWITCHA 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:Requirements
InstallationJust add the or use CocoaPods with Podfile: pod 'RAMPaperSwitch' or Carthage users can simply add to their
UsageRAMPaperSwitch is a drop-in replacement of UISwitch. You just need to set the
Animate viewsYou 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 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)
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论