自定义视图上的AirPlay按钮 [英] AirPlay button on custom view

查看:270
本文介绍了自定义视图上的AirPlay按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

4.3最后:)我正在搜索如何添加空气播放按钮到自定义视图。我有MPMoviePlayer加载电影。我禁用了标准控件,并使用自定义播放,暂停,停止,音量按钮添加了叠加视图。
如果有人知道如何添加空中播放按钮请分享知识吗?
我找不到要发送的通知,听什么...... :(

4.3 finally :) I am searching right now how to add air play button to custom view. I have MPMoviePlayer that load movie. I disabled standard controls and added overlay view with my custom play, pause, stop, volume buttons. If anybody know how to add button that will be air play please share knowledge? I cant't find what notification to send, what to listen...:(

推荐答案

编辑似乎我在之前的回答中被误导了,因为该设备没有运行已发布的iOS 4.3版本。

EDIT It seems I've been misguided in my previous answer because the device was not running the released version iOS 4.3.

有一种方法可以提供自定义界面上的 AirPlay按钮

使用 MPVolumeView 并将其添加到视图层次结构中

There is a way to provide the AirPlay button on a custom interface.
Use a MPVolumeView and add it to your view hierarchy

MPVolumeView *myVolumeView =
[[MPVolumeView alloc] initWithFrame: overlayView.bounds];
[overlayView addSubview: myVolumeView];
[myVolumeView release];

MPVolumeView 提供音量滑块和路线按钮(见下图)。但我不认为只显示按钮。

The MPVolumeView provides the volume slider and the route button (see image below). But I don't think it's possible to only display the button.

这篇关于自定义视图上的AirPlay按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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