Class: UnderOs::UI::Input
- Includes:
- Editable
- Defined in:
- lib/under_os/ui/input.rb
Constant Summary
Constants included from Editable
Constants included from Wrap
Wrap::INSTANCES_CACHE, Wrap::RAW_WRAPS_MAP, Wrap::WRAPS_TAGS_MAP
Instance Method Summary collapse
- #hide_keyboard ⇒ Object
-
#initialize(options = {}) ⇒ Input
constructor
A new instance of Input.
-
#textFieldShouldReturn(textField) ⇒ Object
def type=(type) case type.to_sym when :password then @_.secureTextEntry = true end end.
Methods included from Editable
#keyboard, #keyboard=, #placeholder, #placeholder=, #value, #value=
Methods inherited from View
Methods included from Manipulation
#append, #clear, #insert, #insertTo, #prepend, #remove
Methods included from Traversing
#children, #empty?, #find, #first, #matches, #parent, #siblings
Methods included from Dimensions
#position, #position=, #size, #size=
Methods included from Animation
#animate, #fade_in, #fade_out, #highlight
Methods included from Commons
#data, #data=, #hidden, #hide, #id, #id=, #page, #show, #tagName, #toggle, #visible
Methods included from Styles
#addClass, #className, #className=, #classNames, #classNames=, #hasClass, #radioClass, #removeClass, #repaint, #style, #style=, #toggleClass
Methods included from Events
Methods included from Wrap
Constructor Details
#initialize(options = {}) ⇒ Input
Returns a new instance of Input.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/under_os/ui/input.rb', line 6 def initialize(={}) super # self.type = options[:type] if options[:type] self.value = [:value] if [:value] self.placeholder = [:placeholder] if [:placeholder] self.keyboard = [:keyboard] if [:keyboard] @_.delegate = self end |
Instance Method Details
#hide_keyboard ⇒ Object
37 38 39 |
# File 'lib/under_os/ui/input.rb', line 37 def hide_keyboard @_.resignFirstResponder end |
#textFieldShouldReturn(textField) ⇒ Object
def type=(type)
case type.to_sym
when :password then @_.secureTextEntry = true
end
end
32 33 34 35 |
# File 'lib/under_os/ui/input.rb', line 32 def textFieldShouldReturn(textField) hide_keyboard false end |