Landry Norris
03/14/2022, 8:36 PMUIStoryboard.storyboardWithName(storyboardName, null).instantiateInitialViewController()
and calling view.addSubview on the main view of the resulting ViewController in my Kotlin ViewController. This works fine, and I’ve set up nice extension functions for this, but I’m seeing that the Safe Area is ignored. I set up rotation lately, reloading the storyboard on device rotation, and I noticed that the Safe Area works this time. Has anyone tried something similar and run into the same issues?Landry Norris
03/14/2022, 8:38 PMSam
03/15/2022, 6:13 PMaddChild(_ childController: UIViewController)
on the parent with your Kotlin vc as the child.
3. Call child.view.translatesAutoresizingMasksIntoContraints = false
4. Call parent.view.addSubView(child.view)
5. Constrain your view in the parent as you need
6. Important: Call child.didMove(toParent: parent)
Child is your Kotlin VC and parent is the plain UIViewController in these steps.Landry Norris
03/15/2022, 6:16 PMSam
03/15/2022, 6:22 PMviewDidAppear
won’t fire.Landry Norris
03/15/2022, 6:23 PMSam
03/15/2022, 6:30 PMLandry Norris
03/15/2022, 8:09 PMLandry Norris
03/15/2022, 8:10 PMSam
03/15/2022, 9:54 PM