Skip to content

Instantly share code, notes, and snippets.

@satococoa
Created July 25, 2012 05:39
Show Gist options
  • Select an option

  • Save satococoa/3174607 to your computer and use it in GitHub Desktop.

Select an option

Save satococoa/3174607 to your computer and use it in GitHub Desktop.
UIWebView#scrollView
class UIWebView
alias_method :original_init, :init
def initWithScrollView
original_init
unless self.respond_to?(:scrollView)
def scrollView
self.subviews.each do |view|
return view if view.kind_of?(UIScrollView)
end
end
end
self
end
alias_method :init, :initWithScrollView
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment