UIPresentationController changes size when another view controller is displayed on top of it
- 阅读更多 关于 UIPresentationController changes size when another view controller is displayed on top of it
问题 I am presenting a modal view controller using UIPresentationController. I am setting the frame of presentedView less than the containView's bounds using following method: override func frameOfPresentedViewInContainerView() -> CGRect { let myDX = (self.containerView!.bounds.width - 600)/2 let myDY = (self.containerView!.bounds.height - 600)/2 return self.containerView!.bounds.insetBy(dx: myDX, dy: myDY) } Everything works great unto this point. Now, I present another view controller modally