Use remote control for non-audio related tasks?

浪子不回头ぞ 提交于 2019-12-23 03:09:05

问题


Would it be possible to use the audio controls in the multitasking tray for non-audio related tasks?

(For example, putting the app icon there, or using the buttons to respond to something else?)

Does this violate an HIG rules?


回答1:


You can use beginReceivingRemoteControlEvents and -remoteControlReceivedWithEvent: if you were the last app playing audio, but doing anything non-standard will be a HIG violation. There was an app which used the volume control to take pictures, but as soon as this was highlighted, the app was pulled until the developer changed the behaviour.

The WWDC 2010 Multitasking video (Part 2) has some details about using the remote.



来源:https://stackoverflow.com/questions/4158810/use-remote-control-for-non-audio-related-tasks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!