I\'m a noob in Objective-C and I have one question.
I have one UILabel
object that I adding to one UIView with this code:
UILabel *label = [
You can get the subview with the code which others have mentioned, just like
UILabel *tagLabel = (UILabel*)[view viewWithTag:1];
But an important point to remember,
viewWithTag:
method will return the receiver view (on which you are calling viewWithTag:
) instead of returning the actual subview you want.So keep the parent view and child views tags distinct whenever you need to use viewWithTag:
.