An open API service indexing awesome lists of open source software.

https://github.com/below/darkuikit

How can I best create a dark mode image for a UIButton — with an svg file?
https://github.com/below/darkuikit

Last synced: 8 months ago
JSON representation

How can I best create a dark mode image for a UIButton — with an svg file?

Awesome Lists containing this project

README

          

# DarkUIKit

## Update: Fixed

The issue could simply be fixed by setting all assets to "Render As Template Image"

## Prime Objective

The prime objective is to have a UIButton with an image that supports dark mode.

## What I have tried so far

* Created an image asset with a differently colored (and, for debugging purposes, differently shaped) image for the dark appearance

* Created a color asset, and assigned it to the `UIButton`

None of these things work. While the icon is obviously changed, its color remains black, even in dark mode.

The color seems to have no effect on the image, even when the asset is set to "Render as Template"

## Any ideas?

Do you have any ideas to have an image that supports dark mode? Is PDF the solution? Or, gasp, png?