From 2f48c5310aaa1b365acc8aba9407b41b8f2ce78f Mon Sep 17 00:00:00 2001 From: Peter Paulis Date: Wed, 4 Oct 2023 16:17:23 +0200 Subject: [PATCH] Update PagerContent+Buildable.swift fixing https://github.com/fermoya/SwiftUIPager/issues/329 --- Sources/SwiftUIPager/PagerContent+Buildable.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/SwiftUIPager/PagerContent+Buildable.swift b/Sources/SwiftUIPager/PagerContent+Buildable.swift index a1c09a2..1377f9f 100644 --- a/Sources/SwiftUIPager/PagerContent+Buildable.swift +++ b/Sources/SwiftUIPager/PagerContent+Buildable.swift @@ -70,6 +70,13 @@ extension Pager.PagerContent: Buildable { mutating(keyPath: \.pageRatio, value: ratio) } + /// Sets whether the page can be controlled by the keyboard + /// + /// - Parameter value: `true` if keyboard control is allowed, `false`, otherwise. Defaults to `true` + func allowsKeyboardControl(_ allow: Bool) -> Self { + mutating(keyPath: \.allowsKeyboardControl, value: allow) + } + #if !os(tvOS) /// User can only swipe forward so in one direction