class UnderOs::UI::Alert::CustomAlertView

Public Instance Methods

alertView(alertView, willDismissWithButtonIndex:buttonIndex) click to toggle source
# File lib/under_os/ui/alert.rb, line 47
def alertView(alertView, willDismissWithButtonIndex:buttonIndex)
  @wrapper.emit(:tap, buttonIndex: buttonIndex, buttonTitle: buttonTitleAtIndex(buttonIndex))
  @wrapper.emit(:close)
end
initiWithOptions(wrapper, options) click to toggle source
# File lib/under_os/ui/alert.rb, line 31
def initiWithOptions(wrapper, options)
  @wrapper = wrapper

  initWithTitle(     options[:title]   || "",
            message: options[:message] || "No message given",
           delegate: self,
  cancelButtonTitle: options[:button]  || "Ok",
  otherButtonTitles: nil )

  (options[:buttons] || []).each do |title|
    addButtonWithTitle title
  end

  self
end