Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ios/PagerViewProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,14 @@ import UIKit
return
}

// The hosting view must not carry a safe area: `PagerView`'s `GeometryReader`
// is measured inside it, and every page is framed to that measurement, so the
// pages end up inset by the safe area while React Native's own layout still
// has them at full size. `propagateSafeArea()` on `PageChildViewController`
// is what gives child UIKit views their insets back; the two are independent.
let hostingController = UIHostingController(
rootView: PagerView(props: props, delegate: delegate)
rootView: PagerView(props: props, delegate: delegate),
ignoreSafeArea: true
)
self.hostingController = hostingController

Expand Down