i have a segment control
let mySegmentControl = UISegmentedControl()
i add two titles for it
mySegmentControl.setTitle(title: "one", forSegmentAt: 0)
mySegmentControl.setTitle(title: "two", forSegmentAt: 1)
i add a label badge to "one"
let myBagdeLabel = UILable(badgeText: "0")
mySegmentControl.addSubView(myBagdeLabel)
the issue is: when "one" is seleted the myBagdeLabel is displayed behind the background color. i did search but did not see any code to fix this issue. see my pictures.