Skip to content

Instantly share code, notes, and snippets.

@MaximeHeckel
Created September 18, 2020 20:31
Show Gist options
  • Save MaximeHeckel/233eeeb0214b56994d2407337fe05bf9 to your computer and use it in GitHub Desktop.
Save MaximeHeckel/233eeeb0214b56994d2407337fe05bf9 to your computer and use it in GitHub Desktop.
Logs showcasing an unexplained behavior of SwiftUI's PageTabViewStyle(): pages keep getting rendered even when not visible and is limited somehow up to 3 views. Once we swipe more than 3 times the .onDisappear modifier is called on the "oldest" view
Page 0 appear
SWIPE
Page 1 appear
SWIPE
Page 2 appear
SWIPE
Page 0 disappeared
Page 3 appear
SWIPE
Page 1 disappeared
Page 4 appear
SWIPE
Page 2 disappeared
Page 5 appear
SWIPE BACK
Page 2 appear
Page 5 disappeared
SWIPE BACK
Page 1 appear
Page 4 disappeared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment