iOS 隐藏系统音量调节界面

    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];

隐藏音量调节UI Demo github 链接

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

iOS 隐藏系统音量调节界面_第1张图片
屏幕快照 2017-06-16 16.34.47.png

你可能感兴趣的:(iOS 隐藏系统音量调节界面)