- (void)showAirPlay
{
MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectZero];
[self.view addSubview:volumeView];
for (UIButton *button in volumeView.subviews)
{
if ([button isKindOfClass:[UIButton class]])
{
[button sendActionsForControlEvents:UIControlEventTouchUpInside];
}
}
}
Add the MPVolumeView to your view, and then send control events to the button. Keep in mind that this is very unstable because if Apple adds another UIButton to MPVolumeView, this will break.