How to take screenshot of portion of UIView?
<p>I want the user to go on my app and take a screenshot of the app after pressing a button programmatically in Swift. I know that <code>UIGraphicsGetImageFromCurrentImageContext()</code> takes a screenshot but I don't want a picture of the entire screen. I want a rectangle to pop up (sort of like a crop tool) and the user can drag and resize the rectangle to take a screenshot of only a certain part of the screen. I want the rectangle to go over a <code>WKWebView</code> and crop a pic of the web view.</p>