I have a question about tags for UIViews.
Is it possible to create your own tag like myview.tag=”main” or something like that?
I’m asking because my views are created in code and not with a nib file. After the container view has loaded and an xml file is fully parsed I need to be able to get at the subviews and update values.
After a bit of digging around I read that using viewWithTag would be a good way to do this
Yes you can do that in your code and it is a common technique.
However, UIView-tag is an integer. So you might want to enum or define something readable
e.g. #define kMySuperViewTag 1 or enum { kMySuperViewTag, kMyNotSoSuperViewTag, …};