Skip to content

UIViewID is a tiny swift package that unifies approach to uniquely identifying `UIView`s by using accessibilityIdentifier.

License

Notifications You must be signed in to change notification settings

leofriskey/UIViewID

Repository files navigation

UIViewID is a tiny swift package that unifies approach to uniquely identifying UIViews by using accessibilityIdentifier.

Usage

To get a view ID:

let id: String = view.getID()

this will either set random UUID to accessibilityIdentifier and return it or return already set accessibilityIdentifier.

Avoid setting accessibilityIdentifier manually to ensure that UUID is always used and no collisions occure.

Installation

To install via Swift Package Manager (SPM) simply do the following:

  1. From Xcode, select from the menu File > Add Package Dependency
  2. Paste the URL https://github.com/leofriskey/UIViewID

About

UIViewID is a tiny swift package that unifies approach to uniquely identifying `UIView`s by using accessibilityIdentifier.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages