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

Propagate .options on View update #703

Merged
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
2 changes: 1 addition & 1 deletion Parchment/Classes/PagingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ open class PagingViewController:

/// An instance that stores all the customization so that it's
/// easier to share between other classes.
public private(set) var options: PagingOptions {
public internal(set) var options: PagingOptions {
didSet {
if options.menuLayoutClass != oldValue.menuLayoutClass {
let layout = createLayout(layout: options.menuLayoutClass.self)
Expand Down
3 changes: 3 additions & 0 deletions Parchment/Structs/PagingControllerRepresentableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ struct PagingControllerRepresentableView: UIViewControllerRepresentable {
if pagingViewController.dataSource == nil {
pagingViewController.dataSource = context.coordinator
}

pagingViewController.options = options
pagingViewController.indicatorClass = PagingHostingIndicatorView.self

pagingViewController.reloadData()

Expand Down