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 @@ -60,14 +60,18 @@ final class RootViewController: UIViewController {
6060 child. removeFromParentWidget ( )
6161
6262 view. addSubview ( child. view)
63+ child. view. backgroundColor = . red
64+ child. view. isHidden = false
65+ child. view. alpha = 1
66+ child. view. frame = view. bounds
6367 child. view. autoresizingMask = [ . flexibleWidth, . flexibleHeight]
64- child. view. translatesAutoresizingMaskIntoConstraints = false
65- childWidget = child
6668
67- // Force layout immediately if view already has bounds
68- if view . bounds != . zero {
69- child . view . frame = view . bounds
69+ if let childController = child . controller , childController . parent == nil {
70+ addChild ( childController )
71+ childController . didMove ( toParent : self )
7072 }
73+
74+ childWidget = child
7175 }
7276
7377 override func viewDidLayoutSubviews( ) {
You can’t perform that action at this time.
0 commit comments