Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set the accessibility attributes on UIBarButtonItem

I have several UIBarButtonItem objects in Interface Builder, and I cannot find any option to set the accessibility label or hint for these buttons.

How can I set these attributes?

like image 952
Tim Norman Avatar asked Oct 26 '09 22:10

Tim Norman


2 Answers

You can use the "User defined runtime attributes" and specify your accessibility information there: Runtime attributes

like image 103
Rafael Nobre Avatar answered Sep 20 '22 23:09

Rafael Nobre


It is not actually enough to just set the accessibilityLabel User Defined Runtime Attribute in Interface Builder. You also have to set isAccessibilityElement to true. This keeps all of the accessibility information within Interface Builder.

IB Screenshot

like image 26
Dan Avatar answered Sep 22 '22 23:09

Dan