Class: UIActionSheet
Overview
To make accessibility labels work in UIActionSheets adapted from gist.github.com/953326
Instance Method Summary collapse
Instance Method Details
#addButtonWithTitle(title) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/formotion/patch/ui_action_sheet.rb', line 8 def addButtonWithTitle(title) = old_addButtonWithTitle(title) self.subviews.each { |subview| if subview.respond_to? :title controlTitle = subview.send(:title) if (title == controlTitle) copyAccessibilityMetadataFrom(title, toControl: subview) return end end } end |
#old_addButtonWithTitle ⇒ Object
6 |
# File 'lib/formotion/patch/ui_action_sheet.rb', line 6 alias_method :old_addButtonWithTitle, :addButtonWithTitle |