Skip to content

Material design components for iOS written in Swift

License

Notifications You must be signed in to change notification settings

0ber/MaterialKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaterialKit

Material design components (inspired by Google Material Design) for iOS written in Swift

Please feel free to make pull requests.

Features

  • Highly customizable

  • Complete example

  • 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

  • [�x] MKButton : floating action button, raised button, flat button, ripple effect

  • MKTextField: ripple effect, floating placeholder

  • MKTableViewCell

  • MKTextView (Coming Soon)

  • MKSwitch (Coming Soon)

  • MKAlert (Coming Soon)

  • MKActivityIndicator (In progress)

  • MKAnimation (In progress)

  • MKLayer

  • MKColor

Components

MKButton

  • There are 3 types of main buttons: Floating Action Button, Raised Button, Flat Button
  • Custommizable attributes: color, ripple location, animation timing function, animation duration...
	let button = MKButton(frame: CGRect(x: 10, y: 10, width: 100, height: 35))
	button.maskEnabled = true
	button.rippleLocation = .TapLocation
	button.circleLayerColor = UIColor.MKColor.LightGreen

MKTextField

  • Single-line text field
  • Floating placeholder
  • Ripple Animation
  • Custommizable attributes: color, ripple location, animation timing function, animation duration...
	textField.rippleLocation = .Left
	textField.floatingPlaceholderEnabled = true
	textField.placeholder = "Description"
	textField.layer.borderColor = UIColor.MKColor.Green.CGColor
	textField.circleLayerColor = UIColor.MKColor.LightGreen

MKTableViewCell

  • Custommizable attributes: color, ripple location, animation timing function, animation duration...
	var cell = tableView.dequeueReusableCellWithIdentifier("MyCell") as MyCell
	cell.rippleLocation = .Center
	cell.circleLayerColor = UIColor.MKColor.Blue

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.LightBlue

Requirements

  • iOS 7.0+
  • Xcode 6.1

License

MaterialKit is released under the MIT license. See LICENSE for details.

About

Material design components for iOS written in Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%