risposta

0

Per espandere il commento di Wain:

  • si può rendere la vista padre in un UIImage;
  • quindi si imposta questa immagine come sfondo della nuova vista.

Ecco una possibile implementazione a 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)