Floaty
Floaty copied to clipboard
Adding a UIView to the button
Hi folks,
I'm trying to add a uiview (kinda like a counter) to the floating button, like this:
But, instead I'm getting this:
Even though, the Debug view hierarchy in xCode is showing me this:
I'm using the following to add the UIView:
Floaty.global.button.addSubview(floatingCounter!)
Anyone has any tips please?
@choujar
floatingCounter.layer.zPosition = CGFloat.greatestFiniteMagnitude
Should fix that problem
Hi @Badi3 - I actually fixed it by adding a separate UIView (with a UILabel inside) and dynamically placing it based on the position of the floating button. But I'll try your solution and get back to you!
Thanks!