         width: Ti.UI.SIZE
         height: 28
       })
-      button.add(label)
+      button.add(@label)
 
     button.addEventListener("touchstart", () => button.backgroundImage = bgPressed)
-    button.addEventListener("touchend", () => button.backgroundImage = bg)
-    button+    button.addEventListener("touchend", () => 
+      settings.onClick()
+      button.backgroundImage = bg
+    )
+    button
+    
+    
+  setTitle: (title) =>
+    @label.text = title
  constructor:(options = {}) ->
    options = root._.extend({
      type: "flat"
    }, options)
    
    if options.type == "back"

      button.add(icon)

    if settings.text?
      @label = Ti.UI.createLabel({
        text: settings.text
        textAlign: "center"
        left: 13
