PNG images with alpha channel are distorted on iOS 17 beta, Xcode 15 beta

I am rendering a png image with an alpha channel from XCAssets in a UIImageView.

The rendering occurs as it should in iOS 16 / Xcode 14, but the image is distorted in iOS 17 beta / Xcode 15 beta. I am not sure why, but the distortion is very apparent.

I have attached below the original PNG, as well a screenshot comparing the incorrect iOS 17 / Xcode 15 beta behavior vs the iOS 16 / Xcode 14 desired behavior.

Comparision:

Original image:

Post not yet marked as solved Up vote post of twodev Down vote post of twodev
1.2k views
  • I found that only loading from UIImage(named: "xxxx") has this problem, and loading with UIImage(contentsOfFIle: "***") is fine, it must be something that Apple handles by default internally

    我发现只有从 UIImage(named: "xxxx") 加载的有该问题,使用 UIImage(contentsOfFIle: "***") 加载时是没问题的,一定是苹果内部默认处理了什么

Add a Comment

Replies

this problem is same as this, i fixed this by using their solutions. https://developer.apple.com/forums/thread/733455