Hello,
First of all, I've already made a bug report here : https://feedbackassistant.apple.com/feedback/19731998
I'm facing a problem while using UIGraphicsImageRenderer
to create an image, that is use to create a UIColor
with a pattern via UIColor(patternImage:)
.
It's well displayed for iOS 18.2 and lower, whereas the whole color is blank with iOS 26.
-> Please find a sample project linked to the bug report
post that illustrates the issue, in theViewController.swift
file. I'll also link screenshots of the sample app, one built with iOS 18.2 and another with iOS 26.0.
Reproduction steps :
- I create an image with UIGraphicsImageRenderer :
let image = UIGraphicsImageRenderer().image { context in // Do anything here }
- Then I use this image to create a UIColor :
UIColor(patternImage: image)
- I apply this color to the fillColor of a CAShapeLayer :
shapeLayer.fillColor = UIColor(patternImage: image)
Expected result :
- Run on iOS 26 and lower and the layer filled with the pattern color is correctly displayed, as it is on iOS 18.2 and lower.
Observed result :
- Run on iOS 26 and the layer is filled with a blank/white color instead of the intended pattern color.
Has anyone been facing the problem ?
Thanks,
Thibault Poujat