How to enable iPod controls in the background to control non-iPod music in iOS 4?

Problem is solved. In short, to enable remote control event, 1) use : – (void)remoteControlReceivedWithEvent:(UIEvent *)theEvent and 2) put this is your view controller : – (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; [self becomeFirstResponder]; } – (BOOL)canBecomeFirstResponder { return YES; } I have to give credit to Grant. He has forked Matt Gallagher’s AudioStreamer … Read more

iOS 7: MPMusicPlayerController volume deprecated. How to change device volume now?

To answer you question exactly: Yes there is other way to change system volume without user interaction. Until recent times I used to think that changing volume using MPVolumeView programmatically is possible only using private API. But I have just verified, that changing the value of volumeSlider and faking slider’s touchUP event works: MPVolumeView* volumeView … Read more

iOS 9: How to change volume programmatically without showing system sound bar popup?

For 2018, working on iOS 11.4 You need to change slider.value after a small delay. extension MPVolumeView { static func setVolume(_ volume: Float) { let volumeView = MPVolumeView() let slider = volumeView.subviews.first(where: { $0 is UISlider }) as? UISlider DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.01) { slider?.value = volume } } } Usage: MPVolumeView.setVolume(0.5) Objective-C version

tech