SwiftUI TabView with paging fails to persist index on orientation change

Originator:v-sam_spencer
Number:rdar://FB9941751 Date Originated:03/03/2022
Status:Open Resolved:
Product:iOS & iPadOS Product Version:15.0+
Classification:SwiftUI Reproducible:Always
 
1. Add a TabView with content to a SwiftUI view / app
2. Run the app in portrait orientation
3. Rotate the device to landscape
4. The TabView scrolls to a random index that is not equal to the current index (e.g. if current index == 1, TabView scrolls to a random index != 1)

See attached code to quickly and easily replicate.

This bug is ALWAYS replicable, regardless of TabView content.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!