o我使用 MPVolumeView 来显示音量滑块。我已经定制了它
[myVolumeView setVolumeThumbImage:[UIImage imageNamed:@"sound_slider_knob.png"] forState:UIControlStateNormal];
[myVolumeView setVolumeThumbImage:[UIImage imageNamed:@"sound_slider_knob.png"] forState:UIControlStateHighlighted];
[myVolumeView setMaximumVolumeSliderImage:[UIImage imageNamed:@"slider_player_bg.png"] forState:UIControlStateNormal];
[myVolumeView setMinimumVolumeSliderImage:[UIImage imageNamed:@"slider_player_fg.png"] forState:UIControlStateNormal];
在 iOS6 上一切正常,但在 iOS5 上,我收到以下错误消息:
-[MPVolumeView setVolumeThumbImage:forState:]: unrecognized selector sent to instance 0x8c29f30
-[UIDevice identifierForVendor]: unrecognized selector sent to instance 0x8909b30
事实上,在 MPVolumeView.h 中有
- (void)setVolumeThumbImage:(UIImage *)image forState:(UIControlState)state NS_AVAILABLE_IOS(6_0);
有什么方法可以在 iOS 5 中自定义 MPVolumeView 吗?