From c0b3a0411008084dbf496fb7bed117d92cc8cbe9 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Fri, 7 Jul 2017 22:39:09 -0500 Subject: [PATCH] =?UTF-8?q?Fixes=20GameViewController=20=E2=80=9Ccannot=20?= =?UTF-8?q?satisfy=20constraints=E2=80=9D=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Delta/Emulation/GameViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Delta/Emulation/GameViewController.swift b/Delta/Emulation/GameViewController.swift index 217d919..1b3103e 100644 --- a/Delta/Emulation/GameViewController.swift +++ b/Delta/Emulation/GameViewController.swift @@ -153,6 +153,9 @@ extension GameViewController { super.viewDidLoad() + // Lays out self.gameView, so we can pin self.sustainButtonsContentView to it without resulting in a temporary "cannot satisfy constraints". + self.view.layoutIfNeeded() + let gameViewContainerView = self.gameView.superview! self.sustainButtonsContentView = UIView(frame: CGRect(x: 0, y: 0, width: self.gameView.bounds.width, height: self.gameView.bounds.height))