Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added contentInteraction property into pagingOptions #593

Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions Parchment/Classes/PagingOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public struct PagingOptions {
/// Determine how users can interact with the menu items.
/// _Default: .scrolling_
public var menuInteraction: PagingMenuInteraction

/// Determine how users can interact with the contents
/// _Default: .scrolling_
public var contentInteraction: PagingContentInteraction

/// The class type for collection view layout. Override this if you
/// want to use your own subclass of the layout. Setting this
Expand Down Expand Up @@ -182,5 +186,6 @@ public struct PagingOptions {
borderColor = UIColor(white: 0.9, alpha: 1)
indicatorColor = UIColor(red: 3 / 255, green: 125 / 255, blue: 233 / 255, alpha: 1)
contentNavigationOrientation = .horizontal
contentInteraction = .scrolling
}
}
10 changes: 6 additions & 4 deletions Parchment/Classes/PagingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,12 @@ open class PagingViewController:

/// Determine how users can interact with the page view controller.
/// _Default: .scrolling_
public var contentInteraction: PagingContentInteraction = .scrolling {
didSet {
configureContentInteraction()
}
public var contentInteraction: PagingContentInteraction {
get { return options.contentInteraction }
set {
options.contentInteraction = newValue
configureContentInteraction()
}
}

/// The current state of the menu items. Indicates whether an item
Expand Down