Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I detect if iPhone has blur enabled?

Starting with the iPhone 4S UIToolbar blurs the background. However the user can manually disable blurring in the Settings under General > Accessibility > Increase Contrast > Reduce Transparency.

Can I programmatically find out if the iPhone actually does use blurring?

The reason is I'd like to adjust the background and barTintColor in case of blurring being disabled or unavailable.

Related, for the "Darken Colors" setting I found a hack to detect it. I'm looking for something similar for the blurring as I'm not aware of a public API for this.

like image 749
Ortwin Gentz Avatar asked Jun 27 '14 11:06

Ortwin Gentz


1 Answers

It's possible to check user's Reduce Transparency setting under iOS 8 with: UIAccessibilityIsReduceTransparencyEnabled().

As for the devices running iOS 7, blur isn't supported on iPhone 4, iPad 2 and 3 (I'm not 100% sure about iPad 2).

like image 167
Arek Holko Avatar answered Oct 16 '22 14:10

Arek Holko