Skip to content

Commit

Permalink
do an OS level check for setText swizzle
Browse files Browse the repository at this point in the history
  • Loading branch information
clayallsopp committed Oct 6, 2012
1 parent a1baa91 commit 6797b94
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/formotion/row_type/string_row.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ def layoutSubviews
end
end

field.swizzle(:setText) do
def setText(text)
r = old_setText(text)
self.sendActionsForControlEvents(UIControlEventEditingChanged)
r
if UIDevice.currentDevice.systemVersion >= "6.0"
field.swizzle(:setText) do
def setText(text)
r = old_setText(text)
self.sendActionsForControlEvents(UIControlEventEditingChanged)
r
end
end
end

Expand Down

0 comments on commit 6797b94

Please sign in to comment.