UI Segment Control returns selected segment index 0 for first time after updating iOS and Xcode to 26

Dynamic UISegment control in collection view returns selected segment index 0 on click of other segments after updating iOS and Xcode 26 for first time afterwards its working as expected in iOS less than 26 devices. But woking fine in iOS 26 devices.

Please suggest how to resolve

Thanks in advance

UI Segment Control returns selected segment index 0 for first time after updating iOS and Xcode to 26
 
 
Q