Re: Images in UI in dark mode
Re: Images in UI in dark mode
- Subject: Re: Images in UI in dark mode
- From: Alex Zavatone via Cocoa-dev <email@hidden>
- Date: Fri, 24 Jul 2020 16:31:53 -0500
Have you looked at it in a view debugger? Is this a Mac app, an iOS app or
what? Which version of Xcode are you using?
> On Jul 24, 2020, at 11:22 AM, David Durkee via Cocoa-dev
> <email@hidden> wrote:
>
> I am finally updating my application to support dark mode. I’ve run into a
> hitch in a place where I use images in buttons or other controls. I formerly
> put the name of the png image in the image field of the control or segment in
> question. I updated for dark mode by creating new images for dark mode,
> creating image sets in an asset catalog, including both light and dark mode
> versions of the images in the image set, and repointing the controls or
> segments to the new image sets (which uses different names from the original
> images).
>
> This looks right in the xib window in Xcode when I switch between light mode
> and dark mode display. But when I build and run the program, I am only seeing
> the light mode versions of the images used even when I am in dark mode. I
> have verified that it is using the image sets by changing the images in the
> light mode slots, but it is never using the dark mode versions from those
> sets.
>
> All other controls in the view are respecting light mode and dark mode
> changes. The chrome of the control that contains the image is also changing
> correctly.
>
> I have also created new controls in the xib or different types and they
> behave the same way.
>
>
> Any idea what I'm doing wrong?
>
> David
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden