• Stars
    star
    2,507
  • Rank 17,560 (Top 0.4 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Material design components for iOS written in Swift

MaterialKit

Platform Language License Issues

NOTE: This project is unmaintained.

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 supporting @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

  • MKLabel

  • MKImageView

  • MKLayer

  • MKColor

  • MKActivityIndicator

  • MKRefreshControl

  • MKNavigationBar

Components

MKButton

  • There are 3 types of main buttons: Floating Action Button, Raised Button, Flat Button
  • Customizable 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.rippleLayerColor = UIColor.MKColor.LightGreen

MKTextField

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

MKTableViewCell

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

MKRefreshControl

  • Customizable attributes: color, height
var refreshControl = MKRefreshControl()
refreshControl.addToScrollView(self.tableView, withRefreshBlock: { () -> Void in
	self.tableViewRefresh()
})
refreshControl.beginRefreshing()

MKImageView (BarButtonItem), MKActivityIndicator

  • Customizable attributes: color, ripple location, animation timing function, animation duration...

  • Play ripple animation whenever you want by calling animateRipple method or by setting userInteractionEnabled = true ripple animation will be played when the label/imageview is tapped

  • Easy to customize UIBarButtonItem or UITabBarButton by using MKLabel or MKImageView

// customize UIBarButtonItem by using MKImageView
let imgView = MKImageView(frame: CGRect(x: 0, y: 0, width: 44, height: 32))
imgView.image = UIImage(named: "uibaritem_icon.png")
imgView.rippleLocation = .Center
imgView.userInteractionEnabled = true

let rightBarButton = UIBarButtonItem(customView: imgView)
self.navigationItem.rightBarButtonItem = rightBarButton

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

MKNavigationBar

A custom UINavigationBar which supports elevation and adding a tint above itself

  • Customizable attributes: color, dark color, elevation, shadow opacity, tint color...
  • Set the class of the navigation bar in the storyboard designer to MKNavigationBar and set the custom properties

MKSwitch

On/off switches toggle the state of a single settings option. The option that the switch controls, as well as the state it’s in, should be made clear from the corresponding inline label. Switches take on the same visual properties of the radio button.

Installation

  • Installation with CocoaPods
	pod 'MaterialKit', '~> 0.4'
  • Copying all the files into your project
  • Using submodule

Requirements

  • iOS 8.0+
  • Xcode 6.1

License

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

More Repositories

1

promviz

Visualize the traffic of your clusters in realtime from Prometheus data
Go
948
star
2

Hakuba

🌸 Cellmodel-driven tableview manager
Swift
473
star
3

Transporter

A tiny library makes uploading and downloading easier
Swift
452
star
4

Net

Http Request wrapper written in Swift
Swift
302
star
5

Sapporo

Cellmodel-driven collectionview manager
Swift
245
star
6

Future

Swift µframework providing Future<T, Error>
Swift
121
star
7

GCD

A wrapper of Grand Central Dispatch written in Swift
Swift
72
star
8

Try

Swift µframework providing Try<T>
Swift
32
star
9

openGL-tankgame

A simple 3D game using openGL
C++
23
star
10

TVDataSource

datasource class for uitableview
Objective-C
17
star
11

gamegl

the bottom part of puzzle dragon game using OpenglES (without any framework)
Objective-C
14
star
12

iBall

iPhone, iPad間のバトルゲーム (OpenGLES)
C
6
star
13

VersionTracker

Tracking the app version
Swift
4
star
14

clibs

Central repository containing C libraries for testing
C
3
star
15

xcode_project_templates

xcode project templates
Objective-C
3
star
16

opencv-optical-flow

OpenCV, Python
Python
3
star
17

Kinect-ARToolKit

some simple examples of using Kinect (OpenNI) and ARToolKit
C++
2
star
18

vlcamera

vlcamera app
Objective-C
2
star
19

funnytext

render text in some shapes, change the position and orientation of each character
Objective-C
2
star
20

tomojisho

a facebook game which looks like a dictionary for your friends. Through this game, you can review the information of your friends
PHP
1
star
21

opencv_ios

opencv (face, eyes... tracking)
1
star
22

nghialv.github.com

my blog
HTML
1
star
23

flex-bison-cpp

a simple example of flex, bison
C++
1
star
24

rubyss

ruby shell script
Ruby
1
star