-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π©βπ¬ [Investment Day] Add Smart Invert Support #645
Conversation
ba3fa89
to
8b4a4b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool!
So far I just noticed that on the profile view the avatar is not adhering to the change. And as we discussed IRL, the tab bar icon. Looks like there are some questionable ways to get hold of that image view π€
@justinswart I've included |
Forgot about appearance proxy π This seems to fix the profile avatar: UIImageView.appearance(whenContainedInInstancesOf: [UITabBar.self]).accessibilityIgnoresInvertColors = true And placing this line in one place might be all we need: UIImageView.appearance().accessibilityIgnoresInvertColors = true But as you mentioned IRL there might be image views where we do want to invert. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lgtm, I think the only question I'd have is whether we could achieve the whole change through UIAppearance
proxy, but I think you mentioned that there are some UIImageView
s that we don't want to apply this to.
π² What
Adds Smart Invert support
π€ Why
Smart invert allows inverting the "chrome" of our app while keeping images untouched. This is only supported on iOS 11 so it's behind
availability
check.π How
"Simply" applied style to all
UIImageView
s that qualify asdisplaying user generated content
.π See
βΏοΈ Accessibility
To toggle Smart Invert on or off you can go to
Settings > General > Accessibility > Display Accommodations > Invert Colors > Smart Invert
or enable Accessibility Shortcut inSettings > General > Accessibility > Accessibility Shortcut (all the way in the bottom) > Smart Invert
Smart Invert
is enabledβ Acceptance criteria