Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call BW::Device explicitly instead of Device #206

Merged
merged 1 commit into from
Mar 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/formotion/patch/ui_text_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def textFieldShouldEndEditing(theTextField)
return self.textFieldShouldEndEditing_callback.call(theTextField)
end

if Device.ios_version >= "7.0"
if BW::Device.ios_version >= "7.0"
theTextField.text = theTextField.text.gsub("\u00a0", " ").strip
end

Expand All @@ -134,7 +134,7 @@ def textField(theTextField, shouldChangeCharactersInRange:range, replacementStri
end

# fix for UITextField in iOS7 http://stackoverflow.com/questions/19569688/uitextfield-spacebar-does-not-advance-cursor-in-ios-7/20129483#20129483
if Device.ios_version >= "7.0"
if BW::Device.ios_version >= "7.0"
if range.location == theTextField.text.length && string == " "
theTextField.text = theTextField.text.stringByAppendingString("\u00a0")
return false
Expand Down
2 changes: 1 addition & 1 deletion lib/formotion/row_type/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Base
attr_accessor :row, :tableView

def self.field_buffer
if Device.iphone? or App.window.size.width <= 320 or Device.ios_version >= "7.0"
if BW::Device.iphone? or App.window.size.width <= 320 or BW::Device.ios_version >= "7.0"
20
else
64
Expand Down
4 changes: 2 additions & 2 deletions lib/formotion/row_type/number_row.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module RowType
class NumberRow < StringRow

def keyboardType
if Device.ipad?
if BW::Device.ipad?
return UIKeyboardTypeNumberPad
end
UIKeyboardTypeDecimalPad
end

end
end
end
end