0
 (IBAction)detailSongsButton:(id)sender {

    switch (songsOrText) {
        case 0:
            _detailProductText.text = _songList;
            _detailSongsButtonLabel.titleLabel.text = @"Album Info.";
//            NSLog(@"_detaiSongsButtonLabel.titleLabel.text: %@",_detailSongsButtonLabel.titleLabel.text);
            songsOrText = 1;
            break;
        case 1:
            _detailProductText.text = _productText;
            _detailSongsButtonLabel.titleLabel.text = @"Song List";
            songsOrText = 0;
            break;
        default:
            break;
    }
}
Simon Goldeen
  • 9,080
  • 3
  • 36
  • 45
LarryB
  • 101
  • 1
  • 3

1 Answers1

0

Ensure you are setting the button for the correct state, when it is selected it may be highlighted and change back to normal.

Try setting the title for all states as such: [button setTitle:@"Title" forState:UIControlStateNormal|UIControlStateHighlighted| UIControlStateDisabled|UIControlStateSelected]

Mitchell Currie
  • 2,769
  • 3
  • 20
  • 26