how can I set the title of an UIButton开发者_如何学运维?
[button setTitle:@"Title" forState:UIControlStateNormal];
The same way you can set separate title if needed for highlighted and selected state (changing last parameter)
//PSEUDO CODE
UIButton *myButton;
[myButton setTitle: @"I'm a f%&%$$%&& button!!!!!!!! yay" forState:UIControlStateNormal];
精彩评论