Post #2357435
2026-01-21 10:56 UTC
@Gray_Wind@mastodon.social Not sure if it helps (cannot test it right now) but the supposed order is:
parent.addChild(vc)
parent.addSubview(vc.view)
// set position/size/constraints of vc.view
vc.didMove(toParent: parent)
(see https://developer.apple.com/documentation/uikit/creating-a-custom-container-view-controller, section “Add a child view controller programmatically to your content”)
You are adding the subview before adding the child VC.
Replies (3)
-
@Gray_Wind@mastodon.social 2026-01-21 11:36
@teilweise@layer8.space I did all of that, didn’t help.
-
@Gray_Wind@mastodon.social 2026-01-21 11:38
@teilweise@layer8.space I will try this order as well just in case. I think before I had this version minimized I had the order just like you suggested.
-
@Gray_Wind@mastodon.social 2026-01-21 11:49
@teilweise@layer8.space Tried this, didn't work out. Thank you for the suggestion tho!