This is to SAM…
iOS doesn’t use Segmented Controls and Big Sur seems to be iOS inspired.
Did you mean… most developers don’t USE it, or that iOS doesn’t HAVE it… Because it does…
here is a simple example
func getUISegmentedControl() -> UISegmentedControl {
let temp=UISegmentedControl(frame:CGRect(x:10,y:50,width:300,height:40))
temp.insertSegment(withTitle:"Segment #1", at:0, animated:false)
temp.insertSegment(withTitle:"Segment #2", at:1, animated:false)
temp.layer.borderColor = UIColor.black.cgColor
let font: [AnyHashable : Any] = [NSAttributedStringKey.font : UIFont.systemFont(ofSize:textSize)]
temp.setTitleTextAttributes(font, for: .normal)
temp.selectedSegmentIndex = 1
temp.addTarget(self, action: #selector(segmentedControlAction(_:)), for: .valueChanged)
parent.addSubview(temp)
return temp
}