User variable attributes (previously named derived attributes) are attributes derived from a view’s descendent. Most attributes from the Custom View descendant can be added as user variables. For example as in the image below, a Custom View have subview with an Image View and Text Label. Attribute text from Text Label and image from Image View has been added as variable attribute to the Custom View named profileImage and name respectively.
Adding User Variable Attribute
To add a user variable, first click on a subview on the custom view descendant.
Then at attribute inspector
- Hover mouse to the left of any attribute that you want to use as a user variable
- Click add user variable icon
- Enter title for the variable
- You can check the attribute is now added when the custom view is selected.
Adding a derived attribute