0

My app needs to fade some music in, starting from 0 and slowing going up to the iPod volume setting. When I do this, the stock Apple volume adjust screen shows up. I followed the directions in this question and create my own MPVolumeView.

MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame: CGRectZero];
[self addSubview: volumeView];

This almost works perfectly, I do not see the system volume UI, which is good, but what I do see now is the AirPlay icon in the upper left hand corner. How can I make that go away?

(And yes, perhaps it would be better if the icon were there but sometimes the visual designer wins...)

Community
  • 1
  • 1
Paul Cezanne
  • 8,629
  • 7
  • 59
  • 90

1 Answers1

1

You need to set the showsRouteButton to NO.

MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame: CGRectZero];
volumeView.showsRouteButton = NO;
[self addSubview: volumeView];

But be aware this will also hide any bluetooth route available and the user can still select airplay via the quickswitch dock.

rckoenes
  • 69,092
  • 8
  • 134
  • 166