File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,18 @@ final class RootViewController: UIViewController {
5454 child. removeFromParentWidget ( )
5555
5656 view. addSubview ( child. view)
57+ child. view. backgroundColor = . red
58+ child. view. isHidden = false
59+ child. view. alpha = 1
60+ child. view. frame = view. bounds
5761 child. view. autoresizingMask = [ . flexibleWidth, . flexibleHeight]
58- child. view. translatesAutoresizingMaskIntoConstraints = false
59- childWidget = child
6062
61- // Force layout immediately if view already has bounds
62- if view . bounds != . zero {
63- child . view . frame = view . bounds
63+ if let childController = child . controller , childController . parent == nil {
64+ addChild ( childController )
65+ childController . didMove ( toParent : self )
6466 }
67+
68+ childWidget = child
6569 }
6670
6771 override func viewDidLayoutSubviews( ) {
You can’t perform that action at this time.
0 commit comments