TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

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?

4      

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.

4      

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.

3      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.