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