MPVolumeView *mpVolumeView = [[MPVolumeView alloc] init];
mpVolumeView.hidden = NO;
[mpVolumeView setShowsRouteButton:YES];
[mpVolumeView setFrame:CGRectMake(-100, -100, 40, 40)];
[mpVolumeView setShowsVolumeSlider:YES];
[self.view addSubview:mpVolumeView];
error:
"OBJC_CLASS$_MPVolumeView", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决方案
target-->linker framework and libraries --> + --> add mediaplayer.framework