You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a SwiftUI view that uses many LazyImages. I also have a function that captures a SwiftUI view, hosts it in a UIHostingController waits a second and uses UIGraphicsImageRenderer to render it to an image. This all works well in the case where the LazyImage is already present on screen, but not if the images haven't finished loading or haven't yet appeared on screen.
I tried using ImagePrefetcher to pull in all the images (roughly 10 of them) and taking the snapshot in the .didComplete closure. I couldn't get this to work.
In the event this had worked I would probably have hit another issue as my LazyImages use .processors to process the images. That may or may not be an issue down the line.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a SwiftUI view that uses many
LazyImage
s. I also have a function that captures a SwiftUI view, hosts it in aUIHostingController
waits a second and usesUIGraphicsImageRenderer
to render it to an image. This all works well in the case where theLazyImage
is already present on screen, but not if the images haven't finished loading or haven't yet appeared on screen.I tried using
ImagePrefetcher
to pull in all the images (roughly 10 of them) and taking the snapshot in the.didComplete
closure. I couldn't get this to work.In the event this had worked I would probably have hit another issue as my
LazyImage
s use.processors
to process the images. That may or may not be an issue down the line.Beta Was this translation helpful? Give feedback.
All reactions