Commit 0ebb473e by Daniel Jonathan Committed by GitHub

Merge pull request #1186 from OrkhanAlikhanov/snackbar-layout

Fixed SnackBar laid out incorrectly
parents b95456d7 ad7a9aee
......@@ -178,6 +178,16 @@ open class SnackbarController: TransitionController {
open func reload() {
snackbar.frame.origin.x = snackbarEdgeInsets.left
snackbar.frame.size.width = view.bounds.width - snackbarEdgeInsets.left - snackbarEdgeInsets.right
snackbar.frame.size.height = snackbar.heightPreset.rawValue
snackbar.layoutEdgeInsets = .zero
if .bottom == snackbarAlignment {
snackbar.frame.size.height += bottomLayoutGuide.length
snackbar.layoutEdgeInsets.bottom += bottomLayoutGuide.length
} else {
snackbar.frame.size.height += topLayoutGuide.length
snackbar.layoutEdgeInsets.top += topLayoutGuide.length
}
rootViewController.view.frame = view.bounds
layoutSnackbar(status: snackbar.status)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment