I have the following code, but it doesn't display the route button.
MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectZero];
volumeView.showsRouteButton = YES;
volumeView.showsVolumeSlider = NO;
[volumeView sizeToFit];
[self.view addSubview:volumeView];
[volumeView release];
In the documentation I read:
The route button is visible by default when there is more than one audio output route available.
I only have one audio output, so the button doesn't show. Is there any way to simulate multiple audio outputs so that I can test this button?
You can use AirPlayer (a Mac Application) to simulate an Apple TV. This should cause the AirPlay button to appear in the simulator. Although it claims to not work with audio, the AirPlay button may still show up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With