 
     if settings.iconSettings?
       @icon = Ti.UI.createImageView(settings.iconSettings)
-      button.add(@icon)
+      @button.add(@icon)
 
     if settings.text?
       @label = Ti.UI.createLabel({

        width: Ti.UI.SIZE
        height: 28
      })
      button.add(@label)

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

  createButton: (settings) =>
    if settings.bg
      bg = settings.bg
    else
      bg = "/Common/Framework/Images/iOS/TitleBar/Buttons/button.png"

    if settings.bgPressed
      bgPressed = settings.bgPressed
    else
      bgPressed = "/Common/Framework/Images/iOS/TitleBar/Buttons/buttonPressed.png"

    button = Ti.UI.createLabel({
      backgroundColor: settings.backgroundColor
      backgroundImage: bg
      backgroundLeftCap: 10
      backgroundRightCap: 10
      height: 30

    })

    if settings.iconSettings?
      @icon = Ti.UI.createImageView(settings.iconSettings)
      @button.add(@icon)

    if settings.text?
      @label = Ti.UI.createLabel({
