From the course: iOS App Development: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reduce transparency

Reduce transparency - iOS Tutorial

From the course: iOS App Development: Accessibility

Start my 1-month free trial

Reduce transparency

- [Instructor] In our app, our cells use a transparent background to overlay text on top of the background image. This is a nice effect, but for some users this design can be difficult to read. Fortunately, there's a setting users can adjust to request that interfaces reduce the amount of transparency. This setting can be toggled by going to Settings, General, Accessibility, Increase Contrast, Reduce Transparency. If we go back to our app we'll see that we're not supporting that preference yet. And in this video we'll learn how to alter our interface to respect a user's preference. We'll do this by working through common pitfalls when working with colors and transparency. Back in Xcode if we open up IndexTableViewCell.swift and go to our awakeFromNib method and open up a new line, on line 34 we can check the value of this preference by using the UIKit method, UIAccessibility IsReduceTransparencyEnabled. And if it is, we'll set our textBackdrop.alpha to 1, which means our backdrop view…

Contents