I want to take a screenshot. In this screenshot, I want the text and image in it. However, I am having an issue because when I take a screenshot, I only see the text but not the image. 

I think the problem is that `clearContainerView` only contains the text but not the image. I can't put the image inside of `clearContainerView` because I want the image to stretch the entire screen... and I want the text centered between the title and tab bar (as shown with green square above).

My code and pictures are below:

**This is my current layout in Storyboard:**
[![enter image description here](https://i.stack.imgur.com/KXd8F.png)](https://i.stack.imgur.com/KXd8F.png)

**This is what I want a screenshot of:**
[![enter image description here](https://i.stack.imgur.com/uOEzs.png)](https://i.stack.imgur.com/uOEzs.png)

**This is the screenshot that I get:**
[![enter image description here](https://i.stack.imgur.com/A45HN.png)](https://i.stack.imgur.com/A45HN.png)

**This is my code:**

```
@IBOutlet weak var clearContainerView: UIView!

@IBAction func takeScreenshotTapped(_ sender: UIButton) {
    let screenshot = clearContainerView.screenshot()
    print(screenshot)
}

extension UIView {
    func screenshot() -> UIImage {
        let image = UIGraphicsImageRenderer(size: bounds.size).image { _ in
            drawHierarchy(in: CGRect(origin: .zero, size: bounds.size), afterScreenUpdates: true)
        }

        return image
    }
}

```

Any suggestions on how to do this?