1

My objective is to create an Apple Watch complication that has multiple colors. Specifically, I want the multi-colored template image that I submit to stay multi-colored instead of defaulting to white. This is on a multi-colored watch face, I know the color will be overridden if the user selects a color tint for their watch face.

What code would I put into which files to keep my complication template multi-colored?

1 Answer 1

1

UIImage has a parameter to define how it is rendered on screen when placed inside of an UIImageView.

If you're loading this image in your code you'll need to set UIImage.RenderingMode to .alwaysOriginal in order to have the system display its colors when there's no tint override. However, if you're simply loading from an Xcode Asset Catalog, just select the asset and then change the rendering mode from the menu in the Inspector.

Render As... dialog in XCAsset Catalog

Select the Inspector, then select Original Image from the Render As dropdown.

See the developer documentation on rendering mode.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm loading from an Xcode Asset Catalog. How do you select the asset and change the rending mode from the menu in the Inspector? That is what I'm stuck on.
@RyanMartinson see my edit above with the screenshot ^. Make sure you've selected all relevant asset variations and then select "Original Image" in the "Render As" dropdown from the Inspector.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.