简体   繁体   中英

iOS AirPlay Action Sheet for public app store publishing - like in Spotify

I've been working on a project that involves AirPlay endpoint selection and was wondering how the guys at Spotify had done the following in-app selection of the available AirPlay endpoints (you can see an AirPlay icon/message at the bottom of the app that when tapped brings up a similar Action Sheet to what you'd see via the Control Center):

Spotify AirPlay操作表

From what I know, the only "public" API one may use for this kind of thing is MPVolumeView which is not necessarily the same, as it'd show a volume controller and a button to trigger such action sheet.

The following blog talks about a MPAudioVideoRoutingPopoverController which is a private API, so wondering if that's what the folks at Spotify are using and if so, why was such thing allowed on the store? (I thought use of private APIs was strictly forbidden by Apple's rules)

If the private route is the only way to achieve it, is there any particular way to do it in a way that Apple would be ok with? ie: like mentioned in an answer to iOS: Airplay picker MPVolumeView alternative around messing with the MPVolumeView and either triggering the UI from there while hiding the rest of the elements?

这个其他答案为仍然使用MPVolumeView类的方法提供了一种替代方法,但是以编程方式调用其中的按钮,同时隐藏了所有(或大部分)接口。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM