Class: UnderOs::UI::Alert::CustomAlertView
- Inherits:
-
UIAlertView
- Object
- UIAlertView
- UnderOs::UI::Alert::CustomAlertView
- Defined in:
- lib/under_os/ui/alert.rb
Instance Method Summary collapse
- #alertView(alertView, willDismissWithButtonIndex: buttonIndex) ⇒ Object
- #initiWithOptions(wrapper, options) ⇒ Object
Instance Method Details
#alertView(alertView, willDismissWithButtonIndex: buttonIndex) ⇒ Object
47 48 49 50 |
# File 'lib/under_os/ui/alert.rb', line 47 def alertView(alertView, willDismissWithButtonIndex:) @wrapper.emit(:tap, buttonIndex: , buttonTitle: ()) @wrapper.emit(:close) end |
#initiWithOptions(wrapper, options) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/under_os/ui/alert.rb', line 31 def initiWithOptions(wrapper, ) @wrapper = wrapper initWithTitle( [:title] || "", message: [:message] || "No message given", delegate: self, cancelButtonTitle: [:button] || "Ok", otherButtonTitles: nil ) ([:buttons] || []).each do |title| addButtonWithTitle title end self end |