         createKeyConstraints(keyboard)
     }
     
+    override func viewWillLayoutSubviews() {
+        super.viewWillLayoutSubviews()
+    }
+    
+    override func viewDidLayoutSubviews() {
+        super.viewDidLayoutSubviews()
+    }
+    
     func addEdgeConstraints() {
         let spacers = [
             "leftSpacer": Spacer(color: UIColor.redColor()),

                    multiplier: 1,
                    constant: 0))
            }
        }
        
        for constraint in allConstraints {

    }
    
    // TODO: make this a single constraint string??
    // TODO: third row: side gaps come AFTER special buttons on sides
    // TODO: last row: flexible gaps w/no edges
    func createKeyGapConstraints(keyboard: Keyboard) {
        var allConstraints: Array<String> = []
        
        var canonicalMarginGap: String? = nil
        
        for i in 0..<keyboard.rows.count {
            // TODO: both of these should be determined based on the model data, not the row #
            let isSideButtonRow = (i == 2)
            let isEquallySpacedRow = (i == 3)
            
            var canonicalKeyGap: String? = nil
            
            for j in 0...keyboard.rows[i].count {
                let keyGapName = "keyGap\(j)x\(i)"
                let keyGap = self.elements[keyGapName]
