Button changes title every time pressed
问题 Im trying this, but when i press it it dont changes, it only displays text. Also tried if else functions, but with no results. .h IBOutlet UIButton *poga1; @property (nonatomic, retain) UIButton *poga1; .m @synthesize poga1; - (void)viewDidLoad { [super viewDidLoad]; [poga1 setTitle:@"My Title" forState:UIControlStateNormal]; [poga1 setTitle:@"My Selected Title" forState:UIControlStateSelected]; } 回答1: Try this: If you added a title through the storyboard (the gui interface) then delete it.