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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more