Last active
March 21, 2024 08:51
-
-
Save freedom27/c709923b163e26405f62b799437243f4 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made the extension more generic so to work on any old NSObject aswel as UIViews.
A new class can confirm by implementing the var badgeParent variable.
Also added some standardisation to the API;
NOTE: remove default parameters from initial functions!
Be wary of autolayout update cycles with the view since it uses relative positioning with points
usage:
let badgeView = UIView(frame: .zero).addBrandedBadge(text: "1", size: .small, color: .regular)