Commit e10b5f39 by Daniel Dahan

added MaterialIcon

parent fbaac96e
......@@ -41,6 +41,7 @@
65D2BEC91BBED1FA00800B7B /* MaterialKeyframeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D2BEC81BBED1FA00800B7B /* MaterialKeyframeAnimation.swift */; settings = {ASSET_TAGS = (); }; };
65DBE4201B9A9244000C804F /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65DBE41E1B9A9244000C804F /* Roboto-Bold.ttf */; };
65DBE4211B9A9244000C804F /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */; };
9612008B1BD5B0AE00C449A6 /* MaterialIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9612008A1BD5B0AE00C449A6 /* MaterialIcon.swift */; settings = {ASSET_TAGS = (); }; };
962F3E531BACA68C0004B8AD /* NavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; };
962F3E541BACA7FB0004B8AD /* NavigationBarView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; };
......@@ -121,6 +122,7 @@
65D2BEC81BBED1FA00800B7B /* MaterialKeyframeAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialKeyframeAnimation.swift; sourceTree = "<group>"; };
65DBE41E1B9A9244000C804F /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Bold.ttf"; sourceTree = "<group>"; };
65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Thin.ttf"; sourceTree = "<group>"; };
9612008A1BD5B0AE00C449A6 /* MaterialIcon.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialIcon.swift; sourceTree = "<group>"; };
962F3E521BACA68C0004B8AD /* NavigationBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationBarView.swift; sourceTree = "<group>"; };
963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
963832411B88DFD80015F710 /* MaterialKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -358,6 +360,7 @@
isa = PBXGroup;
children = (
65BDD14C1BB5ED9F006F7F2B /* MaterialTheme.swift */,
9612008A1BD5B0AE00C449A6 /* MaterialIcon.swift */,
65BDD1481BB5DC98006F7F2B /* MaterialColor.swift */,
65BDD14E1BB5EE4A006F7F2B /* MaterialGravity.swift */,
65BDD1531BB6F473006F7F2B /* MaterialDepth.swift */,
......@@ -537,6 +540,7 @@
65BDD1521BB6EE7C006F7F2B /* RobotoFont.swift in Sources */,
9688D06D1BD4587200A70097 /* SearchBarView.swift in Sources */,
9693BF991BCDC1450087054A /* SideNavigationViewController.swift in Sources */,
9612008B1BD5B0AE00C449A6 /* MaterialIcon.swift in Sources */,
9693BF961BCCCB520087054A /* BasicCardView.swift in Sources */,
96D26BFD1BC23649006478BD /* ImageCardView.swift in Sources */,
65BDD1591BB6FE3E006F7F2B /* FlatButton.swift in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_archive_blue_grey_darken_4.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_archive_blue_grey_darken_4@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_archive_blue_grey_darken_4@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_archive_blue_grey_darken_4_48pt.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_archive_blue_grey_darken_4_48pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_archive_blue_grey_darken_4_48pt@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_archive_white_48pt.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_archive_white_48pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_archive_white_48pt@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_check_blue_grey_darken_4.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_check_blue_grey_darken_4@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_check_blue_grey_darken_4@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_star_white_48pt.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_star_white_48pt@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_star_white_48pt@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
public enum MaterialIconSize {
case Small
case Normal
case Medium
case Large
}
public struct MaterialIcon {
/**
:name: iconWithSize
*/
public static func iconWithSize(name: String, size: MaterialIconSize) -> UIImage? {
switch size {
case .Normal:
return UIImage(named: name)
case .Small:
return UIImage(named: name + "_18pt")
case .Medium:
return UIImage(named: name + "_36pt")
case .Large:
return UIImage(named: name + "_48pt")
}
}
// white
public struct white {
/**
:name: accessAlarm
*/
public static func accessAlarm(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_access_alarm_white", size: size)
}
/**
:name: alarmOff
*/
public static func alarmOff(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_alarm_off_white", size: size)
}
/**
:name: alarmOn
*/
public static func alarmOn(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_alarm_on_white", size: size)
}
/**
:name: archive
*/
public static func archive(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_archive_white", size: size)
}
/**
:name: check
*/
public static func check(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_check_white", size: size)
}
/**
:name: checkCircle
*/
public static func checkCircle(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_check_circle_white", size: size)
}
/**
:name: close
*/
public static func close(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_close_white", size: size)
}
/**
:name: create
*/
public static func create(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_create_white", size: size)
}
/**
:name: delete
*/
public static func delete(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_delete_white", size: size)
}
/**
:name: list
*/
public static func list(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_list_white", size: size)
}
/**
:name: menu
*/
public static func menu(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_menu_white", size: size)
}
/**
:name: moreVert
*/
public static func moreVert(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_more_vert_white", size: size)
}
/**
:name: search
*/
public static func search(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_search_white", size: size)
}
/**
:name: star
*/
public static func star(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_star_white", size: size)
}
/**
:name: starBorder
*/
public static func starBorder(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_star_border_white", size: size)
}
/**
:name: stars
*/
public static func stars(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_stars_white", size: size)
}
/**
:name: viewList
*/
public static func viewList(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_view_list_white", size: size)
}
}
// blueGrey
public struct blueGrey {
public struct darken4 {
/**
:name: alarmOff
*/
public static func alarmOff(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_alarm_off_blue_grey_darken_4", size: size)
}
/**
:name: alarmOn
*/
public static func alarmOn(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_alarm_on_blue_grey_darken_4", size: size)
}
/**
:name: archive
*/
public static func archive(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_archive_blue_grey_darken_4", size: size)
}
/**
:name: cancel
*/
public static func cancel(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_cancel_blue_grey_darken_4", size: size)
}
/**
:name: check
*/
public static func check(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_check_blue_grey_darken_4", size: size)
}
/**
:name: checkCircle
*/
public static func checkCircle(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_check_circle_blue_grey_darken_4", size: size)
}
/**
:name: close
*/
public static func close(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_close_blue_grey_darken_4", size: size)
}
/**
:name: delete
*/
public static func delete(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_delete_blue_grey_darken_4", size: size)
}
/**
:name: search
*/
public static func search(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_search_blue_grey_darken_4", size: size)
}
/**
:name: star
*/
public static func star(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_star_blue_grey_darken_4", size: size)
}
/**
:name: stars
*/
public static func stars(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_stars_blue_grey_darken_4", size: size)
}
}
}
// yellow
public struct yellow {
public struct darken3 {
/**
:name: star
*/
public static func star(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_star_yellow_darken_3", size: size)
}
}
}
// amber
public struct amber {
public struct darken3 {
/**
:name: star
*/
public static func star(size: MaterialIconSize = .Normal) -> UIImage? {
return MaterialIcon.iconWithSize("ic_star_amber_darken_3", size: size)
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment