         borderLayer.fillColor = UIColor.clearColor().CGColor
     }
     
-    func layoutPopup() {
+    func layoutPopup() -> Bool {
         if self.popup != nil && self.popupDirection == nil {
             self.popupDirection = Direction.Up
             


import UIKit

// popup constraints have to be setup with the superview in mind; hence these callbacks
protocol KeyboardKeyProtocol {
    func frameForPopup(key: KeyboardKey, direction: Direction) -> CGRect
    func willShowPopup(key: KeyboardKey, direction: Direction) //may be called multiple times during layout

    }
    
    func hidePopup() {
        if self.popup != nil {
            self.delegate?.willHidePopup(self)
            
