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;
    }
}
4

1 回答 1

0

确保您将按钮设置为正确的状态,当它被选中时,它可能会突出显示并恢复正常。

尝试为所有状态设置标题: [button setTitle:@"Title" forState:UIControlStateNormal|UIControlStateHighlighted| UIControlStateDisabled|UIControlStateSelected]

于 2013-07-31T23:07:52.037 回答