Skip to content

Commit 551e147

Browse files
committed
Revert "Consider nav bar behavior in preferred content size"
This reverts commit 46ad737.
1 parent 616353c commit 551e147

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

SwiftMessages/SwiftMessagesSegue.swift

+1-9
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,8 @@ extension SwiftMessagesSegue {
359359
segue.messageView.installBackgroundVerticalView(segue.containerView)
360360
}
361361
let toVC = transitionContext.viewController(forKey: .to)
362-
363-
// Nav controller automatically includes height of nav bar in,
364-
// the `preferredContentSize` and our logic needs to consider this.
365-
var navInset: CGFloat = 0
366-
if let nav = toVC as? UINavigationController {
367-
navInset = nav.navigationBar.frame.height
368-
}
369-
370362
if let preferredHeight = toVC?.preferredContentSize.height,
371-
preferredHeight - navInset > 0 {
363+
preferredHeight > 0 {
372364
segue.containerView.heightAnchor.constraint(equalToConstant: preferredHeight).with(priority: UILayoutPriority(rawValue: 951)).isActive = true
373365
}
374366
if let preferredWidth = toVC?.preferredContentSize.width,

0 commit comments

Comments
 (0)