objective-c - MPVolumeView 和 iOS 5

标签 objective-c ios ios5 volume mpvolumeview

我正在尝试制作一个 slider 来控制设备音量。 以前我已经用 MPVolumeView 完成了这个,但是从 iOS 5 开始我在构建时遇到以下错误:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MPVolumeView", referenced from:
  objc-class-ref in PlayerViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

谁能告诉我问题是什么,或者有其他方法可以控制设备音量。

提前致谢!

最佳答案

您需要确保链接到 MediaPlayer.framework

关于objective-c - MPVolumeView 和 iOS 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7787483/

相关文章:

ios - 将 Unity Game 插件到现有的 Xcode 项目中

iphone - ios中的信用卡支付

objective-c - iOS:NSMutableArray 为空

objective-c - Objective-C 的 MessagePack 实现

ios - 为什么某些对象不能与 NSDictionary 速记一起使用?

ios - 创建触发警报 View Controller 的选项卡栏项目

iOS 本地化(在应用程序中设置)

ios - 尝试在 iOS 中获取 Google 日历时,控制台显示奇怪的 api#channel 冲突。怎么解决?

iphone - UIWebView加载本 map 片的时滞

ios - 在 ios uitableview 中间歇性地获取 json 提要失败