Skip to content

NotchToolbarDelegate

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

Protocol

NotchToolbarDelegate

NotchToolbarDelegate protocol defines the methods that handle events related to device orientation changes and tool icons selection.


Topics

Handling device orientation changes

func deviceDidRotate()

This delegate method is triggered when the device orientation changes. Calling autoResize() method inside this delegate is required in order to have the NotchBar working properly.

Handling icon selection

func didTapToolIcon(_ tools: UICollectionView, toolIndex:IndexPath, section: Int, row: Int)

This delegate method is triggered when the user selects an icon.

Parameters

tools is the UICollectionView where the selection happened.
toolIndex returns the IndexPath of the icon.
section returns the toolIndex.section of the icon.
row returns the toolIndex.row of the icon.