       })
       @button.add(@label)
 
-    @button.addEventListener("touchstart", () => @button.backgroundImage = @bgPressed)
-    @button.addEventListener("touchend", () => 
-      settings.onClick()
-      @button.backgroundImage = @bg if !@button.isPressed
-    )
+    @setEnabled(settings.enabled)
+    
     @button
-    
     
   setTitle: (title) =>
     @label.text = title

      })
      @button.add(@label)

    @button.addEventListener("touchstart", () => @button.backgroundImage = @bgPressed)
    @button.addEventListener("touchend", () => 
      settings.onClick()
      @button.backgroundImage = @bg if !@button.isPressed
    )
    @button

  createButton: (settings) =>

root.ImageButton_Framework = class ImageButton_Framework
  constructor:(options = {}) ->
    @options = root._.extend({
      type: "flat"
      onClick: () => Ti.API.info("button clicked")
      backgroundColor: "transparent"
      enabled: true
    }, options)
    
    @bg = ""
    @bgPressed = ""
    
    if @options.type == "back"
      @view = @createBackButton(@options)
    else
      @view = @createButton(@options)
    
  createBackButton: (settings) =>
    @bg = "/Common/Framework/Images/iOS/TitleBar/Buttons/back.png"
