Skip to content

Commit

Permalink
Merge pull request #1186 from OrkhanAlikhanov/snackbar-layout
Browse files Browse the repository at this point in the history
Fixed SnackBar laid out incorrectly
  • Loading branch information
DanielDahan authored Nov 6, 2018
2 parents b95456d + ad7a9ae commit 0ebb473
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/iOS/SnackbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0ebb473

Please sign in to comment.