This file contains 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 | |
@IBDesignable | |
class SomeLiveClass: UIView { | |
@IBInspectable var placeholder: String = "Default" | |
@IBInspectable var fontSize: CGFloat = 20 | |
@IBInspectable var lineWidth: CGFloat = 1 | |
@IBInspectable var lineColor: UIColor = UIColor.blackColor() | |
This file contains 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 | |
public class TotemPaintCodeKit : NSObject { | |
//// Cache | |
private struct Cache { | |
static var imageOfSmileFace: UIImage? | |
static var smileFaceTargets: [AnyObject]? | |
} |
This file contains 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 | |
enum Direction { case In, Out } | |
protocol Dimmable { } | |
extension Dimmable where Self: UIViewController { | |
func dim(direction: Direction, color: UIColor = UIColor.blackColor(), alpha: CGFloat = 0.0, speed: Double = 0.0) { | |
This file contains 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 PrimaryViewController: UIViewController, Dimmable { | |
let dimLevel: CGFloat = 0.5 | |
let dimSpeed: Double = 0.5 | |
override func viewDidLoad() { super.viewDidLoad() } | |
override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } | |
This file contains 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 SecondaryViewController: UIViewController { | |
@IBOutlet weak var popupView: UIView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
popupView.layer.cornerRadius = 10 | |
popupView.layer.borderColor = UIColor.blackColor().CGColor | |
popupView.layer.borderWidth = 0.25 |