DEV Community

Coder
Coder

Posted on • Originally published at itscoderslife.wordpress.com on

2 1

How to tweak the Volume HUD in iOS?

iOS volume change HUD is a big freaking non interactable rounded rectangle pop up. This obstructs the UI for good 2-3 seconds. This irritates me. So if there are any media apps to be developed use this technique to customize volume change feedback UI.

Now if you are developing an app and need very less irritated users or frustrated users, then never ever use feedback HUDs right in the center of the screen and that too for more than 2-3 seconds.

Now one default such HUD is Volume HUD which comes over all the applications. But good thing is you can customize it.

You need to add just 3 things in your view controller:

  1. Apple’s MediaPlayer framework
  2. A dummy instance of MPVolumeView​ added as a subview of your view
  3. An observer to AVSystemController_AudioVolumeNotificationParameter

The below linked youtube video guides you on how to implment this in your project:

The source code to the sample mentioned in the video is available on Github:

https://github.com/itsdamslife/iOS-Custom-Volume-UI

Share your feedback in here or below the youtube video.

Happy coding 😉

Damodar Shenoy's DEV Profile

Advertisements

        __ATA.cmd.push(function() {
            __ATA.initSlot('atatags-26942-5adb57912d977', {
                collapseEmpty: 'before',
                sectionId: '26942',
                width: 300,
                height: 250
            });
        });



        __ATA.cmd.push(function() {
            __ATA.initSlot('atatags-114160-5adb57912d97a', {
                collapseEmpty: 'before',
                sectionId: '114160',
                width: 300,
                height: 250
            });
        });
Enter fullscreen mode Exit fullscreen mode

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

Top comments (0)

Billboard image

📊 A side-by-side product comparison between Sentry and Crashlytics

A free guide pointing out the differences between Sentry and Crashlytics, that’s it. See which is best for your mobile crash reporting needs.

See Comparison

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay