I am trying to switch a UIBarButton identifier depending on a state with this code:
if ([musicPlayer playbackState] == MPMusicPlaybackStatePlaying) {
[playBtn setStyle:UIBarButtonSystemItemPause];
} else {
[playBtn setStyle:UIBarButtonSystemItemPlay];
}
But I get this warning (and it doesn't work)
Implicit conversion from enumeration type 'enum UIBarButtonSystemItem' to different enumeration type 'UIBarButtonItemStyle' (aka 'enum UIBarButtonItemStyle')