We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d361d65 commit 031cc54Copy full SHA for 031cc54
1 file changed
ios/RNAirPlayButtonManager.m
@@ -12,10 +12,17 @@ @implementation RNAirPlayButtonManager
12
13
- (UIView *)view
14
{
15
- MPVolumeView *volumeView = [[MPVolumeView alloc] init];
16
- volumeView.showsVolumeSlider = false;
17
-
18
- return volumeView;
+ if (@available(iOS 11.0, *)) {
+ AVRoutePickerView *airplayButton = [[AVRoutePickerView alloc] init];
+ airplayButton.activeTintColor = [UIColor blueColor];
+ airplayButton.tintColor = [UIColor whiteColor];
19
+ return airplayButton;
20
+ } else {
21
+ // If you still support previous iOS versions, you can use MPVolumeView
22
+ MPVolumeView *airplayButton = [[MPVolumeView alloc] init];
23
+ airplayButton.showsVolumeSlider = NO;
24
25
+ }
26
}
27
28
@end
0 commit comments