Extensions to create a UIBarButtonItem with a CAShapeLayer holding a string to display a badge number or text
You can simply create a custom UIButton and then add it to a UIBarButtonItem as a customView, then use the setBadge function found in the extension on the UIBarButtonItem to set your badge.