UIViewID

1.0.0

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

What's New

2024-04-20T10:29:15Z
  • Implemented getID()

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

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Oct 18 2024 10:36:07 GMT-0900 (Hawaii-Aleutian Daylight Time)