To expand on Wain's comment:
- you can render the parent view in a
UIImage
;
- you then set this image as the background of your new view.
Here is a possible implementation in Swift:
override func viewDidLoad() {
super.viewDidLoad()
// render parent view in a UIImage
UIGraphicsBeginImageContext(self.view.bounds.size);
self.parent?.view.layer.render(in: UIGraphicsGetCurrentContext()!)
let viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// add the image as background of the view
self.view.insertSubview(UIImageView(image: viewImage), at: 0)