Skip to content

Commit

Permalink
rechsteiner#697: Propagate .options modifier on SwiftUI View update
Browse files Browse the repository at this point in the history
  • Loading branch information
nfgrilo committed Feb 17, 2024
1 parent bae5e44 commit 2a278d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 2a278d3

Please sign in to comment.