How to disable the highlight control state of a UIButton?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
UIButton enters the highlighted state automatically while the user is pressing it. You cannot really remove the existence of that control state, but you can stop it from producing a visible style change by keeping the highlighted appearance identical to the normal one or by overriding highlight behavior in a subclass.
What the Highlighted State Actually Is
The highlighted state is part of UIControl behavior. When a touch goes down inside the button, UIKit toggles isHighlighted and may dim the image, adjust the title, or trigger custom configuration changes depending on button type and styling.
That means the real question is usually not “how do I disable the state internally,” but “how do I prevent the user from seeing a different visual state.”
Keep Normal and Highlighted Appearance the Same
For many buttons, the simplest fix is to set the same assets and colors for .normal and .highlighted:
If the visual assets are identical for both states, the highlight transition becomes effectively invisible.
This is usually enough for custom-styled buttons that rely on explicit images or title colors.
Override Highlight Behavior in a Subclass
If UIKit is still applying an unwanted dimming or state update, override isHighlighted and ignore the visual transition:
This stops the button from reacting visually to the highlighted assignment.
A more conservative version preserves the internal state but forces appearance back to normal:
The exact override strategy depends on whether you want to suppress state changes entirely or only neutralize the visual effect.
Watch Button Type and Configuration APIs
Modern iOS buttons can be affected by UIButton.Configuration, tint behavior, and system button types. If you are using configuration-based buttons, update the configuration logic so the highlighted state does not apply a different appearance.
For example, if you set colors in one place but the configuration update handler changes them on highlight, the button may still flash or dim even though the base properties look correct.
That is why subclassing or consistent state configuration is often more reliable than changing one visual property in isolation.
UX Considerations
Removing highlight feedback has a tradeoff: the button may feel less responsive. In many designs, some touch feedback is useful, even if it is subtle.
A softer alternative is to replace the default highlight with a custom animation that fits the design better, such as a very small scale or background transition instead of a strong dimming effect.
So before disabling the effect completely, decide whether you are solving a visual bug or removing a helpful interaction cue.
Common Pitfalls
The biggest mistake is trying to disable highlight by setting only one property, such as the title color, while the button still changes image alpha or configuration elsewhere.
Another issue is forgetting that UIButton(type: .system) and custom-styled buttons can behave differently. The button type affects default rendering behavior.
Developers also sometimes override isHighlighted too aggressively and unintentionally interfere with accessibility or event expectations. Test the resulting button carefully.
Finally, if the problem comes from configuration-based styling on newer iOS versions, changing old-style state properties alone may not be enough.
Summary
- You usually do not remove the highlighted state itself; you remove its visible effect.
- The simplest fix is to make
.normaland.highlightedlook the same. - For stricter control, subclass
UIButtonand neutralize highlight updates. - Check button type and configuration-based styling on modern iOS.
- Keep some touch feedback if possible so the button still feels responsive.

