WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

Snapshot of SwiftUI or UIKit

Forums > iOS

Hi, I found out as of iOS 14 that the article

"How to render a UIView to a UIImage"

is not compatible with WKWebView on a physical device. However, it's fully supported on the Xcode iOS & iPadOS Simulators. Additionally, the article

"How to convert a SwiftUI view to an image"

is affected too.

Does anyone have any information on this matter?

2      

It appears the the solution for "How to convert a SwiftUI view to an image" does not work in iOS 15. Works perfectly on iOS 14 or below but on iOS 15 the resulting image is down the Y axis and the bottom content is cut off.

2      

I use the solution "How to convert a SwiftUI view to an image" as well in my app and it worked perfectly. It worked on simulators and real devices (iPad and IPhone) in tests for weeks, but with updating to iOS 15 I see the same error mentioned above, the whole image is shifted down and the bottom is cut off, while on top, parts of the embedding view is visible.

1      

Save 50% in my Black Friday sale.

SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.