Is it possible to change UIButton title label text via dot syntax? The text is not changing if I do it via dot syntax:
self.myButton.titleLabel.text = [NSString stringWithString:@"Nop"];
But this one does:
[self.myButton setTitle: @"Yep" forState: UIControlStateNormal];
Text change works for pure UILabels, is UIButton a special case or something?
This is because the text can be changed for a UIButton for several different states (Normal, Highlighted, etc). Apple simply chose to require explicit code to set the text. You could probably create a category to implement this, if you really wanted.