Mobile: Interface Builder - Runtime

Accessibility can get very complex by adding in gesture, traits, etc. but for the purposes of Appcues ALL YOU HAVE TO DO IS SET A IDENTIFIER

This approach is only for views that are accessible via Interface Builder (i.e. xib, storyboard, etc.). Views that are programmatically created refer to Accessibility ID: Programmatically. 

Xcode allows you to set Accessibility IDs in Interface Builder in two ways. This article will outline one of the ways and Interface Builder - Accessibility outlines the second. 

Repeat steps for all views:

  1. Go to any of the views and/or viewControllers within your project in Interface Builder
  2. Select a specific view element to tag (i.e. select an image, label, button, etc.)
  3. Go to Identity Inspector
  4. In the User Defined Runtime Attributes Press the + button
  5. In the Key Path write accessibilityIdentifier 
    Tip: Be sure to spell accessibilityIdentifier correctly. If it’s not spelt correctly the element won’t be tagged. 
  6. Change the Type to String
  7. The Value field is where you set the identifier name. The more unique this is the better because we use this value to find the element to tag a tooltip to. 

Still need help? Contact Us Contact Us