Skip to content

NotchBar

Ahmed Fathi Bekhit edited this page Oct 2, 2017 · 1 revision

Class

NotchBar

NotchBar is the class that handles drawing the notch bezier path, mode, height, background color, corner radii, animation intervals, and the visibility of the view.


Topics

Initializing and Configuring

var mode: notchMode

A variable that allows you to choose between .statusBar & .noStatusBar modes. Default is .statusBar.
.statusBar mode sets the width of the NotchBar view to the exact same width as the iPhone X notch.
.noStatusBar mode sets the width of the NotchBar view 30% wider than the width of the iPhone X notch.

var height: CGFloat

A variable that allows you to configure the height of your NotchBar. Default is 250.

var bgColor: UIColor

A variable that allows you to configure the background color of your NotchBar. Default is .black.

var curve: CGFloat

A variable that allows you to configure the corner radii of your NotchBar. Default is 35.

var isVisible: Bool

A variable that allows you to configure the visibility of your NotchBar. Default is false.

var animationInterval: TimeInterval

A variable that allows you to configure the animations time interval preformed by the NotchBar. Default is 0.3.

Reconfiguring the NotchBar.

func refresh(orientation: deviceOrientation)

This method allows you to reconfigure the NotchBar with a new or the same orientation.