-
Notifications
You must be signed in to change notification settings - Fork 3
NotchImageView
Class
NotchImageView is the class that handles initializing and configuring a NotchBar with a UIImage, initializing the protocols, and triggering protocols when events are changed.
The delegate object that handles device orientation changes and toolbar icon selection.
The variable that initializes and draws a NotchBar.
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.
A CGFloat that allows configuring the printing bar height. Default is 3.0
A UIColor that allows configuring the printing bar color. Default is UIColor.cyan
A TimeInterval that allows configuring the animation duration used in load(). Default is 3.0
Initialize with a UIImage
Prepares the NotchImageView with default configurations in a UIViewController. To customize your NotchImageView, make sure to configure it with the new settings before calling prepare(in vc:UIViewController).
A method that allows you to load an image from the device's notch with animation.
A method that allows you to remove the loaded image from the superview.
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.