how do you add a label relative to other UI elements(开发者_如何学运维custom views/controls as well)?
You should operate on frame property (eg. put label at bottom of the button):
CGRect buttonRect = self.myButton.frame;
buttonRect.origin.y = buttonRect.origin.y + buttonRect.size.height;
UILabel *lbl = createALabel();
lbl.frame = buttonRect;
[self.myButton.superview addSubView:lbl];
精彩评论