-
Notifications
You must be signed in to change notification settings - Fork 3
NotchToolbar
Class
NotchToolbar is the class that handles the initialization and configuration of the NotchBar, initializing the protocols, and triggering protocols when an events are changed.
The delegate object that handles device orientation changes and toolbar icon selection.
The variable that initializes and draws a NotchBar.
A notchScroll variable that allows you to configure the scrolling direction of the toolbar. Default is auto.
A boolean that allows you to configure whether you want to show the NotchBar only on iPhone X or older iPhone devices too. Default is false.
The UICollectionView where the tool icons are added.
A variable that allows you to configure the size of the icon cells. Default is CGSize(width: 60, height: 60).
A variable that allows you to configure the UICollectionView edge insets. Default is UIEdgeInsets(top:5, left:35, bottom:5, right:35).
An array that accepts Strings, UIImages or an array of both types.
String types allows you to add full size emojis.
UIImage types allows you to add image icons.
[String, UIImage] an array of both types allows you to add an image icon with a title.
A variable that allows you to change the font of String type icons.
A variable that allows you to change the color of String type icons.
A variable that allows you to change the font of the title in an array of [String, UIImage] type icons.
A variable that allows you to change the color of the title in an array of [String, UIImage] type icons.
Prepares the NotchToolbar with default configurations in a UIViewController. To customize your NotchToolbar, make sure to configure it with the new settings before calling prepare(in vc:UIViewController).
Displaying and Resizing the notch
A method that allows you to show and hide the NotchBar. This method automatically detects if the NotchBar is visible or not.
To get the current NotchBar visibility, use notch.isVisible.
A method that automatically resize the NotchBar. You must call this method in deviceDidRotate delegate in order to have the NotchBar working properly in different device orientations.