Unique identifier of a UIView object

I am having the following problem.

  • When a certain touch appears on UIVIew, I want to keep this unique identifier of UIView (e.g. let say objectID) so that when I reopen my application, I can check if there is one UIView with a unique identifier from the repository in the visible UIViews. I don’t want to store tag values ​​as object identifiers, because they may not be unique, and they are manually configured. I need to get a unique identifier, which is automatically assigned by the system. Any ideas hot to get it?
+3
source share
2 answers

, .

UIView, -? .

0

, restorationIdentifier, , .

+1

Source: https://habr.com/ru/post/1770260/


All Articles