适用于公共应用商店发布的iOS AirPlay操作表 - 例如Spotify [英] iOS AirPlay Action Sheet for public app store publishing - like in Spotify

查看:302
本文介绍了适用于公共应用商店发布的iOS AirPlay操作表 - 例如Spotify的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直致力于一个涉及AirPlay端点选择的项目,并且想知道Spotify的人们如何在应用程序中选择可用的AirPlay端点(您可以在底部看到AirPlay图标/消息)点按的应用程序会显示与您通过控制中心看到的类似的操作表:

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):

据我所知,唯一可用于此类事情的公共API是 MPVolumeView 不一定相同,因为它显示了一个音量控制器和一个触发这种动作的按钮表。

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.

关注一个 MPAudioVideoRoutingPopoverController 这是一个私有API,所以想知道Spotify的用户是否正在使用它,如果是这样,为什么商店允许这样的东西? (我认为Apple的规则严格禁止使用私有API)

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)

如果私有路由是实现它的唯一方法,有没有特别的方法来实现它Apple可以采用哪种方式?即:像 iOS:Airplay选择器MPVolumeView替代方案的回答中提到的那样 MPVolumeView 并从那里触发UI,同时隐藏其余元素?

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 类的方法的替代方法,但是在隐藏所有(或大部分)接口的同时以编程方式调用其中的按钮触摸。

This other answer provides an alternative to the approach still using the MPVolumeView class but invoking the touch of the button inside it programmatically while hiding all (or most) of the interface.

这篇关于适用于公共应用商店发布的iOS AirPlay操作表 - 例如Spotify的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆