mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 22:51:53 +08:00
code to hide keyboard from rmq.app added
This commit is contained in:
@@ -32,6 +32,19 @@ module RubyMotionQuery
|
||||
UIApplication.sharedApplication.delegate
|
||||
end
|
||||
|
||||
# @return [UIApplication]
|
||||
def get
|
||||
UIApplication.sharedApplication
|
||||
end
|
||||
|
||||
# Returns boolean of success of hiding
|
||||
# @return [Boolean]
|
||||
def hide_keyboard
|
||||
self.get.sendAction(:resignFirstResponder, to:nil, from:nil, forEvent:nil)
|
||||
end
|
||||
alias :resign_responders :hide_keyboard
|
||||
alias :end_editing :hide_keyboard
|
||||
|
||||
# @return [Symbol] Environment the app is running it
|
||||
def environment
|
||||
@_environment ||= RUBYMOTION_ENV.to_sym
|
||||
|
||||
Reference in New Issue
Block a user