Hi my issue is probably the same as the one described in the Objective-C repo (mustafaibrahim989/MIBadgeButton#3).
When using a button's border, the border is displayed above the badge.
For instance:
button.layer.cornerRadius = 5
button.layer.borderColor = UIColor.white.cgColor
button.layer.borderWidth = 1
button.badgeBackgroundColor = UIColor.blue
produces the following result:
