2 ms·
Or you could use a loop :). for (UILabel *l in @[self.usernameLabel, self.firstNameLabel, …]) { l.textAlignment = UITextAlignmentRight; l.t
by SeoxyS 14y ago
Or you could use a loop :).
for (UILabel *l in @[self.usernameLabel, self.firstNameLabel, …]) {
l.textAlignment = UITextAlignmentRight;
l.textColor = [UIColor redColor];
}
- bennyg 14y agoOr use a helper class (called Design.m/.h) with a call: +(void)styleLabelForCertainPage:(UILabel *)label { label.textAlignment = UITextAlignmentRight; label.textColor = [UIColor redColor]; } Then run those through your loops. If you're seriously considering writing a lot of lines for something trivial, then you're probably doing it wrong in Objective-C.