Skip to content

Commit

Permalink
Improve constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdelgado committed Apr 30, 2024
1 parent 3122e86 commit ff06ba1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Source/Classes/OverlayContainerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,8 @@ open class OverlayContainerViewController: UIViewController {
} else {
translationConstraints.append(overlayContainerView.topAnchor.constraint(equalTo: overlayTranslationContainerView.topAnchor))
}

overlayConstraints.append(overlayContainerView.bottomAnchor.constraint(equalTo: overlayTranslationView.bottomAnchor))

} else {
translationConstraints.append(
overlayConstraints.append(
overlayContainerView.bottomAnchor.constraint(equalTo: overlayTranslationContainerView.bottomAnchor)
)
}
Expand All @@ -286,9 +283,13 @@ open class OverlayContainerViewController: UIViewController {
translationHeightConstraint = overlayTranslationView.heightAnchor.constraint(equalToConstant: 0)
switch style {
case .flexibleHeight:
overlayContainerViewStyleConstraint = overlayContainerView.bottomAnchor.constraint(
equalTo: overlayTranslationView.bottomAnchor
)
if landscapeLayout {
overlayContainerViewStyleConstraint = nil
} else {
overlayContainerViewStyleConstraint = overlayContainerView.bottomAnchor.constraint(
equalTo: overlayTranslationView.bottomAnchor
)
}
case .rigid:
overlayContainerViewStyleConstraint = overlayContainerView.heightAnchor.constraint(
equalToConstant: 0
Expand Down

0 comments on commit ff06ba1

Please sign in to comment.