Material design風格的iOS組件:MaterialKit
采用Swift開發的iOS Material design 組件。
特性
- 高度可定制
- 完整的示例
- Supports @IBDesignable to live-render the component in the Interface Builder
-
By suporting @IBInspectable, the class properties can be exposed in the Interface Builder, and you can edit these properties in realtime
-
MKButton : floating action button, raised button, flat button, ripple effect
- MKTextField: ripple effect, floating placeholder
- MKTableViewCell
- MKTextView (In progress)
- MKCheckBox
- MKAlert
- MKLayer
- MKColor
Components
MKButton
Custommizable attributes
rippleLocation: MKRippleLocation = .TapLocation:Center,Left,RightmaskEnabled: Bool = true:falsecircleGrowRatioMax: Float = 0.9cornerRadius: CGFloat = 2.5backgroundLayerCornerRadius: CGFloat = 0.0shadowAniEnabled: Bool = truebackgroundAniEnabled: Bool = trueaniDuration: Float = 0.65circleAniTimingFunction: MKTimingFunction = .Linear:EaseIn,EaseOut,CustombackgroundAniTimingFunction: MKTimingFunction = .Linear:EaseIn,EaseOut,CustomshadowAniTimingFunction: MKTimingFunction = .EaseOut:EaseIn,EaseOut,CustomcircleLayerColor: UIColor = UIColor(white: 0.45, alpha: 0.5)backgroundLayerColor: UIColor = UIColor(white: 0.75, alpha: 0.25)
MKTextField
Custommizable attributes
cornerRadius: CGFloat = 2.5rippleLocation: MKRippleLocation = .TapLocation:Center,Left,Rightpadding: CGSize = CGSize(width: 5, height: 5)floatingLabelBottomMargin: CGFloat = 2.0floatingPlaceholderEnabled: Bool = falseaniDuration: Float = 0.65circleAniTimingFunction: MKTimingFunction = .Linear:EaseIn,EaseOut,CustomcircleLayerColor: UIColor = UIColor(white: 0.45, alpha: 0.5)backgroundLayerColor: UIColor = UIColor(white: 0.75, alpha: 0.25)floatingLabelFont: UIFont = UIFont.boldSystemFontOfSize(10.0)floatingLabelTextColor: UIColor = UIColor.lightGrayColor()
MKTableViewCell
Custommizable attributes
rippleLocation: MKRippleLocation = .TapLocation:Center,Left,RightcircleAniDuration: Float = 0.75circleAniTimingFunction: MKTimingFunction = .Linear:EaseIn,EaseOut,CustombackgroundAniDuration: Float = 1.0circleLayerColor: UIColor = UIColor(white: 0.45, alpha: 0.5)backgroundLayerColor: UIColor = UIColor(white: 0.75, alpha: 0.25)
MKLayer
A subclass of CALayer.
MKColor
A category for UIColor that adds some methods to get flat colors designed by Google
// get color from UIColor
let lightBlueColor = UIColor.MKColor.LightBlueRequirements
- iOS 7.0+
- Xcode 6.1
項目主頁:http://www.baiduhome.net/lib/view/home/1416205132883
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!


