Unique identifier of an UIView object
I am having a following problem.
- When a certain touch occures on a UIVIew, I want to store this UIView's unique identifier (like let's say objectID) so that when I reopen my app again I can check if in the visible UIViews there is the one UIView with the unique ID from the storage. I do not want to store the tag values开发者_开发技巧 as object ids because they may not be unique and they are manualy set up. I need to get a unique identifier that is automatically assign by the system. Any ideas hot to get it?
Old thread but, restorationIdentifier
is probably what was wanted here.
They don't have a unique identifier that will be the same each time the app is run.
What does the UIView represent i.e. someone's name? Store that piece of information instead and re-create the view when the app next starts up.
精彩评论