def update_ui_field_style
      Base.style(@ui_field, @field_style) if @field_style.present?
      @ui_field.secureTextEntry=@type==:password
      @ui_field.autocorrectionType = get_auto_correct_type(@auto_correct)
      @ui_field.autocapitalizationType = get_auto_capitalize_type(@auto_capitalize)
      @ui_field.keyboardType = get_keyboard_type(@keyboard)
      @ui_field.enabled = @type != :label
      @ui_field.adjustsFontSizeToFitWidth = @reduce_font_size

      if @model.respond_to?(:has_error?) && @model.has_error?(@field_name)
        @ui_field.leftViewMode = UITextFieldViewModeAlways
        if @ui_field.leftView.nil? || @ui_field.leftView.tag != 888
          error_label_styles ={frame: [[0,0], [25,25]],
                               textColor: :red.uicolor,
                               backgroundColor: :clear.uicolor,
                               font: 'GillSans-Bold'.uifont(25),
                               textAlignment: :center.uialignment,
                               text: '!',
                               tag: 888}
          error_label = Base.style(UILabel.new, error_label_styles)
          @ui_field.leftView = error_label
        end
      else
        @ui_field.leftViewMode = UITextFieldViewModeNever
      end

      if is_number_pad? && !@ignore_number_addon
        text_toolbar = Base.style(UIToolbar.new, frame: CGRectMake(0,0,320,44))
        done_button = UIBarButtonItem.alloc.initWithBarButtonSystemItem(UIBarButtonSystemItemDone, target: self, action: 'textFieldShouldReturn:')
        text_toolbar.items=[
            UIBarButtonItem.flexible_space, done_button
        ]
        @ui_field.inputAccessoryView = text_toolbar
      else
        @ui_field.inputAccessoryView = nil

      end

      stop_listen
      listen_keyboard
    end
def update_ui_field_style
      Base.style(@ui_field, @field_style) if @field_style.present?
      @ui_field.secureTextEntry=@type==:password
      @ui_field.autocorrectionType = get_auto_correct_type(@auto_correct)
      @ui_field.autocapitalizationType = get_auto_capitalize_type(@auto_capitalize)
      @ui_field.keyboardType = get_keyboard_type(@keyboard)
      @ui_field.enabled = @type != :label
      @ui_field.adjustsFontSizeToFitWidth = @reduce_font_size

      if @model.respond_to?(:has_error?) && @model.has_error?(@field_name)
        @ui_field.leftViewMode = UITextFieldViewModeAlways
        if @ui_field.leftView.nil? || @ui_field.leftView.tag != 888
          error_label_styles ={frame: [[0,0], [25,25]],
                               textColor: :red.uicolor,
                               backgroundColor: :clear.uicolor,
                               font: 'GillSans-Bold'.uifont(25),
                               textAlignment: :center.uialignment,
                               text: '!',
                               tag: 888}
          error_label = Base.style(UILabel.new, error_label_styles)
          @ui_field.leftView = error_label
        end
      else
        @ui_field.leftViewMode = UITextFieldViewModeNever
      end

      if is_number_pad? && !@ignore_number_addon
        text_toolbar = Base.style(UIToolbar.new, frame: CGRectMake(0,0,320,44))
        done_button = UIBarButtonItem.alloc.initWithBarButtonSystemItem(UIBarButtonSystemItemDone, target: self, action: 'textFieldShouldReturn:')
        text_toolbar.items=[
            UIBarButtonItem.flexible_space, done_button
        ]
        @ui_field.inputAccessoryView = text_toolbar
      else
        @ui_field.inputAccessoryView = nil

      end

      stop_listen
      listen_keyboard
    end
options
 type:
   :password
   :label

 auto_correct:
   true
   false
   UITextAutocorrectionType

 auto_capitalize:
   true
   false
   UITextAutocapitalizationType

 keyboard:
   :decimal
   uikeyboardtype (sugarcube)
   UIKeyboardType

 precision: Numeric (only useful when value is Numeric)
            default:
              Integer: 0
              Float:   6

 error:
   true
   false

 reduce_font_size:
   true
   false