UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

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.