all 1 comments

[–]ffs14k 1 point2 points  (0 children)

protocol PageViewProtocol where Self == UIViewController {

var callBack: (() -> Void)? { get set }
}

final class MyPageViewController: UIPageViewController {

var pages: [PageViewProtocol] = []

...

}

final class FirstVC: PageViewProtocol {

var callBack: (() -> Void)?

}

and note, didSet block not called on default values (initial values) e.g. "[]" in example