Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

MDMTransitionPresentationController should implement viewWillTransitionToSize #49

@jverkoey

Description

@jverkoey

frameOfPresentedViewInContainerView is unfortunately only called during the initial presentation of a view controller, meaning a view controller that's presented over part of the screen won't know to update its layout when the device's orientation changes.

To solve this, we can implement viewWillTransitionToSize and invoke _calculateFrameOfPresentedView with the new dimensions. This will allow the block to return a new size for the new dimensions.

Unfortunately, some quick sleuthing revealed that the containerView's frame isn't up-to-date when viewWillTransitionToSize is invoked and, because our block implementations tend to look at the containerView's bounds, most of our layout blocks will probably be wrong.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions