Need to work out the state of the iPhone's silent switch in iOS 5? This simple static library lets you do just that with a single call.
The Problem
Before iOS 5, developers would use the audio route to detect the position of the silent switch. This generally worked fairly well, but was never intended by Apple for this purpose. In fact, according to Apple, there is "no method for determining the silent switch state" present in the iOS frameworks. In iOS 5, the audio route method of determining the silent switch state was "fixed" and using this method no longer works. Apple doesn't want developers to be aware of this setting. If you set the appropriate audio session parameters, everything should "just work". But that's not always the case. There are several instances where a developer may want to know the state of the silent switch (mute switch) that aren't related to overriding the user's audio preferences. For instance, what if an app relies on audio, but the user has the mute switch on? The developer gets all sorts of reviews and email complaints about the software not working, when really the user just needed to turn off the mute switch.
The Solution
Enter the VSSilentSwitch library. Using the library, developers can determine the state of the silent switch successfully in all versions of iOS. The library is entirely compact, and only adds a few kilobytes to your end-product. You need to add 6 Apple frameworks and you can be setup and using the library in under 5 minutes. The library uses 100% public API calls and is already used in several apps that are live in the app store, including our own eNotify. Using this library will not get you rejected by Apple.
Setup
To use the library, simply add it to your project. Make sure you've included the CoreTelephony, AudioToolbox, MobileCoreServices, SystemConfiguration, libz.dylib, and CFNetwork frameworks in your project as well. Finally, add "-all_load" and "-ObjC" to the "Other Linker Flags" in your project's build settings. That's all you need to do!
License
You must acquire an individual license for for the Component for each unique application bundle ID you choose to use the Component in. For development purposes, you must utilize the TRIAL version of the Component. Before submission to the app store or release to an Enterprise customer, the final build of the application must be updated to link to the RELEASE version of the Component, which can be purchased here via CocoaControls.com. Return to CocoaControls.com to purchase additional licenses. The TRIAL version of the Component is freely redistributable for evaluation and development purposes.
Demo Project
Feel free to download the demo library and try it out. We've included a demo project as well as the library so you can see that it works. This demo is time-limited to 15 minutes. After the 15 minutes are up, the library will start returning completely random results.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
苹果ios开发100个实例源码; 个人信息输入表(支持表单增删) 二维码扫描应用demo 二维码生成器 从GIF动画创建一个动态UIImages 对象 从上往下拉出现加载view,动态加载内容 从上往下拉动态加载 从上往下拉动态加载3 从下往上弹出的子视图窗口 从下往下拉进行列表内容动态加载 仿Instagram, Path, DailyBooth底部导航风格 仿UIAlertView和UIActionSheet的一个效果 仿苹果音乐播放器的歌曲封面滑动效果 仿谷歌3d地图 侧边伸缩导航栏效果 侧边划出划开 出现键盘,输入区域向上移动以便显示出输入的区域 分享action sheet 分类 功能完整的瀑布墙视图效果 动态tab bar 动态效果的tab标签 动态评分组件 包含丰富功能的编辑器 各种效果的字体 各种效果的字体2 国家拾取器 地图上多个指针显示(一些本地化应用或社交应用可以用得到) 多个table view略缩图 多种page control 风格 多种view视图切换效果 多种样式的圆形动态加载特效 多种样式的无背景图片的按钮效果 多种类型的图表 多种视图切换方式集锦 多
资源推荐
资源详情
资源评论
收起资源包目录
苹果ios开发100个实例源码.zip (322个子文件)
Thumbs.db 8KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
Thumbs.db 5KB
XYOrigami.flv 963KB
GSBookShelf.flv 856KB
EarthView.flv 771KB
MWPhotoBrowser.flv 717KB
Core_Plot.flv 621KB
Web_Browser_View_Controller.flv 559KB
TapKu_Coverflow.flv 514KB
PrettyKit.flv 513KB
Scroller for iOS.flv 381KB
PullToRefreshTransform.flv 320KB
iOS Filter Control.flv 309KB
Center_Button_in_Tab_Bar.flv 191KB
TapKu_Alerts_with_Images.flv 118KB
OCCalendar.flv 107KB
lbgifimage.gif 53KB
three20-photo-thumbnails.jpg 65KB
full.jpg 49KB
egotextview.jpg 45KB
mdaboutcontroller.jpg 33KB
epgltransitionview.jpg 30KB
psstackedview.jpg 29KB
mktickerview.jpg 28KB
full.jpg 18KB
DDProgressView.mp4 26KB
687474703a2f2f7777772e756e65742e756e697669652e61632e61742f25374561303834363739342f4f434d6170566965772f73637265656e73686f74732f6f70656e5f636c75737465725f6d6170766965775f6f66662e706e67.png 252KB
mwphotobrowser.png 241KB
full (1).png 197KB
687474703a2f2f7777772e756e65742e756e697669652e61632e61742f25374561303834363739342f4f434d6170566965772f73637265656e73686f74732f6f70656e5f636c75737465725f6d6170766965775f6f6e2e706e67.png 186KB
full.png 185KB
687474703a2f2f7777772e756e65742e756e697669652e61632e61742f25374561303834363739342f4f434d6170566965772f73637265656e73686f74732f6f70656e5f636c75737465725f6d6170766965775f67726f7570732e706e67.png 182KB
screenshot.png 159KB
tapku-coverflow.png 152KB
full (1).png 143KB
web-browser-view-controller.png 138KB
ylprogressbar.png 133KB
full (1).png 132KB
gikanimatedcallout.png 131KB
uamodalpanel.png 126KB
tweetbot-like-uialertview-and-uiactionsheet-replacement.png 119KB
full.png 110KB
dlstarrating.png 92KB
pullableview.png 92KB
hgpagescrollview.png 89KB
ocmapview.png 88KB
full.png 85KB
lkbadgeview.png 81KB
截图.png 78KB
imageless-gradient-buttons.png 72KB
ddalertprompt.png 71KB
full (1).png 71KB
core-plot.png 70KB
spuserresizableview.png 63KB
vppdropdown.png 60KB
styledpagecontrol.png 60KB
alertpickerview.png 59KB
sespringboard.png 57KB
full.png 57KB
full.png 52KB
tpkeyboardavoiding.png 52KB
full (1).png 51KB
hpgrowingtextview.png 49KB
pull-to-refresh-tableview.png 48KB
abpersonviewcontroller-delete.png 46KB
vertically-swipe-between-pages-of-content.png 44KB
dcroundswitch.png 41KB
yrdropdownview.png 40KB
paneltableview.png 40KB
full (1).png 37KB
sparklines.png 36KB
tdsemimodal.png 36KB
mhtabbarcontroller.png 34KB
fxlabel.png 34KB
tttquadrantcontrol.png 32KB
icarousel.png 32KB
iosplot.png 31KB
full.png 31KB
共 322 条
- 1
- 2
- 3
- 4
探索者我有我路向
- 粉丝: 278
- 资源: 1815
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页