//
//  DrawingViewController.swift
//  Padiddle
//
//  Created by Zev Eisenberg on 9/12/15.
//  Copyright © 2015 Zev Eisenberg. All rights reserved.
//

import UIKit

let showDebugLabel = false

class DrawingViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = .whiteColor()

        let width = CGRectGetWidth(UIScreen.mainScreen().bounds)
        let height = CGRectGetHeight(UIScreen.mainScreen().bounds)

        let longSide = max(width, height)

        view.widthAnchor.constraintEqualToConstant(longSide).active = true
        view.heightAnchor.constraintEqualToConstant(longSide).active = true

        if showDebugLabel {
            let label = UILabel()
            label.text = "Drawing view debug label"
            label.translatesAutoresizingMaskIntoConstraints = false
            view.addSubview(label)

            label.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor).active = true
            label.centerYAnchor.constraintEqualToAnchor(view.centerYAnchor).active = true
        }
    }
}

//
//  DrawingViewController.swift
//  Padiddle
//
//  Created by Zev Eisenberg on 9/12/15.
//  Copyright © 2015 Zev Eisenberg. All rights reserved.
//

import UIKit

class DrawingViewController: UIViewController {

    private let label = UILabel()

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = .whiteColor()

        let width = CGRectGetWidth(UIScreen.mainScreen().bounds)
        let height = CGRectGetHeight(UIScreen.mainScreen().bounds)

        let longSide = max(width, height)

        view.widthAnchor.constraintEqualToConstant(longSide).active = true
        view.heightAnchor.constraintEqualToConstant(longSide).active = true

        label.text = "Drawing view will go here eventually"
        label.translatesAutoresizingMaskIntoConstraints = false
        view.addSubview(label)

        label.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor).active = true
        label.centerYAnchor.constraintEqualToAnchor(view.centerYAnchor).active = true
    }
}

--- 
+++ 
@@ -8,9 +8,9 @@
 
 import UIKit
 
+let showDebugLabel = false
+
 class DrawingViewController: UIViewController {
-
-    private let label = UILabel()
 
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -25,11 +25,14 @@
         view.widthAnchor.constraintEqualToConstant(longSide).active = true
         view.heightAnchor.constraintEqualToConstant(longSide).active = true
 
-        label.text = "Drawing view will go here eventually"
-        label.translatesAutoresizingMaskIntoConstraints = false
-        view.addSubview(label)
+        if showDebugLabel {
+            let label = UILabel()
+            label.text = "Drawing view debug label"
+            label.translatesAutoresizingMaskIntoConstraints = false
+            view.addSubview(label)
 
-        label.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor).active = true
-        label.centerYAnchor.constraintEqualToAnchor(view.centerYAnchor).active = true
+            label.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor).active = true
+            label.centerYAnchor.constraintEqualToAnchor(view.centerYAnchor).active = true
+        }
     }
 }
Hide drawing view controller debug label unless a flag is set.
