Skip to content

Commit

Permalink
Apply paging offset fix only on Xcode 12 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizmb committed Sep 8, 2020
1 parent 8b7e9f9 commit e05ff17
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ extension PagingScrollView {
/// Since the HStack is centered by default this offset actually moves it entirely to the left
/// - Parameter proxy: Proxy that contains this view.
private func stackOffset(for proxy: GeometryProxy) -> CGFloat {
if #available(iOS 14, *) {
#if swift(>=5.3)
if #available(iOS 14.0, *) {
return 0
}
#endif

let remainingSpace = contentWidth(for: proxy)
- pageWidth(for: proxy)
Expand Down

0 comments on commit e05ff17

Please sign in to comment.