HomeiOS DevelopmentLiquid glass segmented management freezes when dragging deal with to a disabled...

Liquid glass segmented management freezes when dragging deal with to a disabled section


Setup:

I’ve a section view with 3 segments, and the final one (at index 2) is disabled.

Situation:

After I drag the liquid glass deal with of the section view from what was beforehand chosen to the disabled section, the liquid glass deal with freezes mid-air.

Liquid glass segmented management freezes when dragging deal with to a disabled section

Workaround: I can nonetheless work together with the deal with and manually restore its place, or faucet on every other section to revive its place.

Notes: I am utilizing UIKit, and no further customizations are utilized.

class ViewController: UIViewController {
 
    @IBOutlet weak var segmentView: UISegmentedControl!
    
    override func viewDidLoad() {
        tremendous.viewDidLoad()
        
        segmentView.removeAllSegments()
        let segments = ["Option 1", "Option 2", "Option 3"]
        for (index, title) in segments.enumerated() {
            segmentView.insertSegment(withTitle: title, at: index, animated: false)
        }
        
        // Choose the primary one by default
        segmentView.selectedSegmentIndex = 0
        
        // Disable the final section
        segmentView.setEnabled(false, forSegmentAt: 2)
    }
}

Apple Developer Discussion board hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments