Infinite Carousel and Cell Reuse During Fold: Scroll UI State Management

How should infinite carousel and cell reusability behave during fold transitions?

  1. Is scroll position preserved during fold?

  2. If fold occurs during cell reuse, can wrong campaign be displayed?

  3. Can "load more" pagination trigger twice during fold?

  4. If swipe gesture is mid-progress during fold, can cell snap to wrong position?

  5. Can carousel animation glitch during fold?

  6. Can cell deallocation fail during fold (memory leak)?

Answered by DTS Engineer in 906731022

Hi @BnsAlm,

Please see our previous response below:

A Summary of the iPhone Duo Group Lab:

https://developer.apple.com/forums/thread/847644

How should apps preserve state — text input, scroll position, video playback, camera sessions — during hinge angle transitions? For example, when a LazyVGrid's column count changes because the device folds, does SwiftUI preserve scroll position automatically, or should you use scrollPosition(id:)?

The system generally preserves text input and scroll position automatically since hinge angle changes are represented as size-class and trait updates, not a scene disconnect or app termination. This applies even to cases like a LazyVGrid column-count change triggered by opening or closing the device — apps typically don't need to manually manage scroll position with scrollPosition(id⚓ ) for this transition. For more info, see Prepare your app for iPhone Duo.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Hi @BnsAlm,

Please see our previous response below:

A Summary of the iPhone Duo Group Lab:

https://developer.apple.com/forums/thread/847644

How should apps preserve state — text input, scroll position, video playback, camera sessions — during hinge angle transitions? For example, when a LazyVGrid's column count changes because the device folds, does SwiftUI preserve scroll position automatically, or should you use scrollPosition(id:)?

The system generally preserves text input and scroll position automatically since hinge angle changes are represented as size-class and trait updates, not a scene disconnect or app termination. This applies even to cases like a LazyVGrid column-count change triggered by opening or closing the device — apps typically don't need to manually manage scroll position with scrollPosition(id⚓ ) for this transition. For more info, see Prepare your app for iPhone Duo.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Infinite Carousel and Cell Reuse During Fold: Scroll UI State Management
 
 
Q