【发布时间】:2016-10-14 07:20:17
【问题描述】:
已解决 在 iOS 10.2 中,AirPlay 按钮重新出现并且仍然有效。苹果的恶作剧!
在 iOS 9 中,我使用此代码来检测 Airplay 设备。对于部署目标 10.00,它不会出现。在控制中心,我可以找到我的播放设备,但在我的应用程序中,uiview 没有显示任何内容。 在我的能力范围内,我检查了“背景模式”、音频、AirPlay 和画中画。也许我忘记了这个祝福沙盒的一些新设置? 感谢您的耐心等待
@property (weak, nonatomic) IBOutlet UIView *airplay;
MPVolumeView *myVolumeView = [[MPVolumeView alloc] initWithFrame: airplay.bounds];
[myVolumeView setShowsVolumeSlider:NO];
[myVolumeView setShowsRouteButton:YES];
myVolumeView.transform = CGAffineTransformMakeScale(0.3,0.3);
[myVolumeView setRouteButtonImage:[UIImage imageNamed:@"myIconAirPlay"] forState:UIControlStateNormal];
[airplay addSubview: myVolumeView];
【问题讨论】:
标签: ios objective-c ios10 airplay