This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| // Usage Examples | |
| let shadowColor = Color.shadow.value | |
| let shadowColorWithAlpha = Color.shadow.withAlpha(0.5) | |
| let customColorWithAlpha = Color.custom(hexString: "#123edd", alpha: 0.25).value | |
| enum Color { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| // Usage Examples | |
| let system12 = Font(.system, size: .standard(.h5)).instance | |
| let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance | |
| let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance | |
| let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance | |
| struct Font { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension UIColor { | |
| /** | |
| Creates an UIColor from HEX String in "#363636" format | |
| - parameter hexString: HEX String in "#363636" format | |
| - returns: UIColor from HexString | |
| */ | |
| convenience init(hexString: String) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum FontType { | |
| case installed(FontName) | |
| case custom(String) | |
| case system | |
| case systemBold | |
| case systemItatic | |
| case systemWeighted(weight: Double) | |
| case monoSpacedDigit(size: Double, weight: Double) | |
| } | |
| enum FontSize { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Logger.log(message: "This is a DEBUG message", event: .d) // DEBUG log | |
| Logger.log(message: "This is an ERROR message", event: .e) // ERROR log | |
| Logger.log(message: "This is an INFO message", event: .i) // INFO log | |
| Logger.log(message: "This is a VERBOSE message", event: .v) // VERBOSE log | |
| Logger.log(message: "This is a WARNING message", event: .w) // WARNING log | |
| Logger.log(message: "This is a SEVERE message", event: .s) // SEVERE Error log | |
| // LOG ON XCODE CONSOLE | |
| 2017-05-13 12:56:34445 [💬][AppDelegate.swift]:20 19 application(_:didFinishLaunchingWithOptions:) -> This is a DEBUG message | |
| 2017-05-13 12:56:34463 [‼️][AppDelegate.swift]:21 19 application(_:didFinishLaunchingWithOptions:) -> This is an ERROR message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| class ShimmerView: UIView { | |
| var primaryColor: UIColor = UIColor(red: 214.0/255.0, green: 214.0/255.0, blue: 214.0/255.0, alpha: 1.0) | |
| var animationColor: UIColor = .white | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum Color { | |
| case theme | |
| case border | |
| case shadow | |
| case darkBackground | |
| case lightBackground | |
| case intermidiateBackground | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Color { | |
| var value: UIColor { | |
| var instanceColor = UIColor.clear | |
| switch self { | |
| case .border: | |
| instanceColor = UIColor(hexString: "#333333") | |
| case .theme: | |
| instanceColor = UIColor(hexString: "#ffcc00") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id":"4kQA1aQK8-Y", | |
| "created_at":"2016-05-29T15:42:02-04:00", | |
| "width":2448, | |
| "height":1836, | |
| "color":"#060607", | |
| "likes":12, | |
| "liked_by_user":false, | |
| "user":{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{ | |
| "title": "Apple MacBook Pro MF839HN/A 13-inch Laptop (Core i5/8GB/128GB/OS X Yosemite/Intel Iris Graphics 6100)", | |
| "desc": "A groundbreaking Retina display. Powerful dual-core and quad-core Intel processors. Fast flash storage. High-performance graphics. Great built-in apps. And now in the 13-inch model, a revolutionary new Force Touch trackpad and even longer battery life.1 Whatever you can imagine, MacBook Pro with Retina display gives you the power to create.", | |
| "priceInUSDollar": 1290.0, | |
| "imageURL": "http://ecx.images-amazon.com/images/I/61R5Fro8r3L._SL100_.jpg" | |
| }, { | |
| "title": "Apple Macbook Pro MD101HN/A 13-inch Laptop (Core i5/4GB/500GB/Mac OS Mavericks/Intel HD Graphics), Silver", | |
| "desc": "The Apple Macbook Pro has a design that can only come from the artists at apple. The lightweight grey-white shiny finish with a simplistic apple logo is something that will turn heads wherever you go. The design uses lightweight but strong aluminium to make sure that your system weighs only 1.35kg to ensure tha |
NewerOlder