mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 02:22:44 +02:00
Refactor sliding modal, combine options when passing
This commit is contained in:
@@ -56,6 +56,8 @@ class SlidingModalContainerView: UIView, Themable, NibLoadable {
|
||||
}
|
||||
}
|
||||
|
||||
var centerInScreen: Bool = false
|
||||
|
||||
// MARK: Outlets
|
||||
|
||||
@IBOutlet private weak var dimmingView: UIView!
|
||||
@@ -130,7 +132,11 @@ class SlidingModalContainerView: UIView, Themable, NibLoadable {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
self.contentViewBottomConstraint.constant = (UIScreen.main.bounds.height + self.dismissContentViewBottomConstant) / 2
|
||||
} else {
|
||||
self.contentViewBottomConstraint.constant = 0
|
||||
if centerInScreen {
|
||||
contentViewBottomConstraint.constant = (bounds.height - contentViewHeightConstraint.constant)/2
|
||||
} else {
|
||||
contentViewBottomConstraint.constant = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user