Skip to content

Commit 2b7f319

Browse files
committed
add hide footerview option
1 parent d8b3986 commit 2b7f319

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/Controllers/BarcodeScannerViewController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public protocol BarcodeScannerDismissalDelegate: class {
3333
*/
3434
open class BarcodeScannerViewController: UIViewController {
3535
private static let footerHeight: CGFloat = 75
36+
public var hideFooterView = false
3637

3738
// MARK: - Public properties
3839

@@ -235,7 +236,7 @@ private extension BarcodeScannerViewController {
235236
cameraView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
236237
cameraView.bottomAnchor.constraint(
237238
equalTo: view.bottomAnchor,
238-
constant: -BarcodeScannerViewController.footerHeight
239+
constant: hideFooterView ? 0 : -BarcodeScannerViewController.footerHeight
239240
)
240241
)
241242

@@ -272,7 +273,7 @@ private extension BarcodeScannerViewController {
272273
messageView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
273274
messageView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
274275
messageView.heightAnchor.constraint(
275-
equalToConstant: BarcodeScannerViewController.footerHeight
276+
equalToConstant: hideFooterView ? 0 : -BarcodeScannerViewController.footerHeight
276277
)
277278
]
278279
}

0 commit comments

Comments
 (0)