def alertView(alertView, didDismissWithButtonIndex:buttonIndex)
      @view_controller.dismissViewControllerAnimated @opts[:animated], completion: nil
      action = @actions_in_display_order[buttonIndex]
      action.handler.call(action.tag, @text_fields) if action.handler
      @view_controller = nil # forget the reference
    end
def alertView(alertView, didDismissWithButtonIndex:buttonIndex)
      @view_controller.dismissViewControllerAnimated @opts[:animated], completion: nil
      action = @actions_in_display_order[buttonIndex]
      action.handler.call(action.tag, @text_fields) if action.handler
      @view_controller = nil # forget the reference
    end
fires when it is time to dismiss <UIAlertViewDelegate>