Sunday, May 31, 2026
HomeiOS Developmentios - accurately set a UIViewControllers body when presenting it on...

ios – accurately set a UIViewControllers body when presenting it on high of one other view controller?

[ad_1]

I am presenting a UIViewController on high of one other view controller utilizing the next code:

let realityKitViewController = RealityKitViewController(localModelPath: modelPath)
realityKitViewController.modalPresentationStyle = .overCurrentContext
            
// Conceal the qr code scanner
GAPP.tabbarCtrl.hideQrCodeScanner(withAnimation: true, completion: {
    topController.current(realityKitViewController, animated: true, completion: nil)
})

In viewDidLoad() of the introduced view controller I then set the body:

let tabbarHeight = GAPP.tabbarCtrl.getTabbarHeight() - self.view.safeAreaInsets.backside
self.view.body = CGRect(x: 0, y: 0, width: self.view.body.width, top: self.view.body.top - tabbarHeight)

Nevertheless, after I take a look at the view hierarchy I can see that the UITransitionView and the UIView of the introduced view controller each nonetheless cowl the entire display screen as an alternative if having the body I set in it is viewDidLoad().

How can I make the UITransitionView and the introduced view controllers UIView the identical body I set within the viewDidLoad() of the introduced view controller so my faucet gestures on the tab bar are nonetheless acknowledged?

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments