SwiftUI: How to take screenshot of ScrollView Content?

Xcode 12 — iOS 14

Prafulla Singh

--

In this tutorial, We will be converting ScrollView’s content into a UIImage.
First, we will convert any view into the UIImage then we will extend the same logic to screenshot the entire Scroll view content.

  1. Create an extension on SwiftUI’s view, which takes the position of part of the view…

--

--