Einhugur macOS Bridge plugin. |

# NSTouchBar.MakeItemForIdentifierDelegate Delegate

Delegate to provide callback for creating touch-bar items. Use of this delegate is optional since you can also create the touch-bar items, inside your MakeTouchBar hook.

MakeItemForIdentifierDelegate(
touchBar as EinhugurMacOSBridge.NSTouchBar,
identifier as String) as EinhugurMacOSBridge.NSTouchBarItem

#### Parameters

touchBar
  The Touch-bar instance to create items for.
identifier
  Identifier of the item to be created.

#### Returns

EinhugurMacOSBridge.NSTouchBarItem
  Instance of the created item or nil if identifier did not match anything.

#### Remarks

Inside the item creation hook you must:
1. Check if the identifier matches something you want to create.
2. Create the matched item.
3. Return the matched item, with same identifier as was requested.
Note the OS is very touchy on getting same identifier back as was requested. Though we have tried to put up safeguards in many places.

#### See Also

NSTouchBar Class