             constant: 0))
     }
     
-    func addGapPair(nameFormat: String, row: Int, startIndex: Int, endIndex: Int, leftAnchor: String?, rightAnchor: String?, vertical: Bool, width: Double?) {
+    func addGapPair(nameFormat: String, row: Int, startIndex: Int, endIndex: Int, leftAnchor: String?, rightAnchor: String?, vertical: Bool, width: String?) {
         var allConstraints: Array<String> = []
         
         var leftGapName = String(format: nameFormat, startIndex, row)
         var rightGapName = String(format: nameFormat, endIndex, row)
+        
         var verticalFlag = (vertical ? "V:" : "")
         var inverseVerticalFlag = (!vertical ? "V:" : "")
         
+        // anchoring
+        
         if leftAnchor {
             allConstraints += "\(verticalFlag)[\(leftAnchor!)][\(leftGapName)]"
         }

                    leftAnchor: "leftSpacer",
                    rightAnchor: "rightSpacer",
                    vertical: false,
                    width: 0)
                addGapPair(
                    "keyGap%dx%d",
                    row: i,

                }
                
                allConstraints += "[keyGap\(j)x\(i)][\(keyName)\(width)][keyGap\(j+1)x\(i)]"
                
                if isCanonicalRowKey {
                    allConstraints += "V:[rowGap\(i)][\(keyName)][rowGap\(i+1)]"
                }
                else {
                    self.centerItems(key!, item2: canonicalRowKey!, vertical: false)
                }
                
                // only the canonical key has a constant width
                if isCanonicalKey {
