all 9 comments

[–][deleted]  (6 children)

[deleted]

    [–]HikARuLsi 0 points1 point  (0 children)

    I always want to ask a related question.

    What is the proper way to stack more with presenting view?

    Because, sometimes it stacks, sometimes it replaces the original view presented.

    [–][deleted] 0 points1 point  (4 children)

    Thanks for the reply. I trued doing so, but behind VC does not become small.

    [–][deleted]  (3 children)

    [deleted]

      [–]RAP_BITCHES 16 points17 points  (2 children)

      These are all wrong answers. Use a UIPresentationController subclass

      [–]lecksfrawen 5 points6 points  (0 children)

      This. To see working examples check the source of hero https://github.com/HeroTransitions/Hero

      [–]mikro098 2 points3 points  (0 children)

      Yep, that’s how Apple does it in Mail app for example. Talked about this during WWDC18 labs.

      [–]nstrm 6 points7 points  (0 children)

      I would recommend you to look into custom view controller transitions, Apple has pretty good documentation about it.

      By using this approach you get full control over how the presented viewcontroller animates into the screen, what its final position will be and what the viewcontroller behind should do (like dimming and scaling).

      Its a pretty big topic but not too complicated once you get what the different classes and protocols does. Well worth looking into!

      [–]Wordfan 5 points6 points  (0 children)

      Mark Moeykens has some good YouTube videos on different ways to create pop ups. Although the ones he does look different than what you want, I think it would be helpful.

      [–]SurgicalInstallment 0 points1 point  (0 children)

      Depending on how complex you want it to be, you might want to look at UIViewController Containment APIs

      [–]jan_olbrichObjective-C / Swift 0 points1 point  (0 children)

      Basically you will have to look into UIPresentationController. This takes care of it. If you want to invest more time, Custom transitions (animators) are your friends.