Coding⏱️ 2 min read📅 2026-06-03

How to Fix: Disabled UIButton not faded or grey

UIButton not faded or grey when disabled

Quick Answer: The UIButton's appearance is controlled by its state in the storyboard, you need to set the "State Mask" property to change the button's color.

When a UIButton is disabled in an iPhone app, it doesn't display the expected faded or grey appearance. This issue can be caused by several factors.

⚠️ Common Causes

  • Using the default UIButton style in Interface Builder, which doesn't include a disabled state.
  • Failing to set the button's alpha value or color when disabling it.
  • Not using the correct disable image for the button.

🚀 How to Resolve This Issue

Method 1: Customizing UIButton Appearance

  1. Step 1: Create a custom UIButton style in Interface Builder, and add a disabled state to the style.

Method 2: Programmatically Disabling UIButton

  1. Step 1: Set the button's alpha value to 0.5 when disabling it.

💡 Conclusion

By following these methods, you can resolve the issue of a disabled UIButton not displaying the expected faded or grey appearance.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions