         }
     }
     
+    var deleteTimer: NSTimer?
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         

import ZLBalancedFlowLayout
import Cartography
import TTTAttributedLabel

let reuseIdentifier = "Cell", headerIdentifier = "header", footerIdentifier = "footer"
let appGroupId = "group.com.axcel.EmoticonKeyboard"

        
        deleteButton = UIButton.buttonWithType(.System) as! UIButton
        deleteButton.setTitle(NSLocalizedString("⌫", comment: "Title for 'Delete' button"), forState: .Normal)
        deleteButton.addAction({button in
            self.deleteText()
            self.deleteTimer = NSTimer.scheduledTimerWithTimeInterval(0.3, action: {timer in
                self.deleteTimer = NSTimer.scheduledTimerWithTimeInterval(0.1, action: {timer in
                    self.deleteText()
                    }, repeats: true)
                }, repeats: false)
            }, forControlEvents: .TouchDown)
        deleteButton.addAction({button in
            self.deleteTimer?.invalidate()
            }, forControlEvents: .TouchUpInside | .TouchUpOutside | .TouchCancel)
        
        for button in [nextKeyboardButton, menuButton, spaceButton, enterButton, deleteButton] {
            button.sizeToFit()
