UIPresentationController - can I update the presented frame of the presentation controller after the presentation?

I am using a custom subclass of UIPresentationController to control the presentation of the UIViewController. I redefine - (CGRect)frameOfPresentedViewInContainerViewto provide a frame that is an insert from the borders of the container.

Now, after some user action on the presented controller, I would like to change the frame of the presented ViewController. My question is: is there a "natural" way to do this?

How can I customize the frame of the presented ViewController after it has been presented?

+4
source share
2 answers

, , :

<UIContentContainer>:

- (void)preferredContentSizeDidChangeForChildContentContainer:(id <UIContentContainer>)container 

preferredContentSize , UIPresentationController.

+3
  • NAV VC (save)
  • x ( modalPresentationStyle popover/fullscreen)
  • [ ] nav vc
  • VC/NAV i.e Y ( )

.

, ,

vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

-1

Source: https://habr.com/ru/post/1629852/


All Articles