mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: add traitCollectionDidChange to controllers
This commit is contained in:
@@ -190,6 +190,18 @@ class UIPageViewControllerImpl extends UIPageViewController {
|
||||
scrollView.frame = CGRectMake(0, scrollViewTop, this.view.bounds.size.width, scrollViewHeight); //this.view.bounds;
|
||||
}
|
||||
}
|
||||
|
||||
public traitCollectionDidChange(previousTraitCollection: UITraitCollection): void {
|
||||
super.traitCollectionDidChange(previousTraitCollection);
|
||||
|
||||
const owner = this._owner.get();
|
||||
owner.notify({ eventName: "traitCollectionChanged", object: owner });
|
||||
console.log("---> UIPageViewControllerImpl.traitCollectionDidChange()");
|
||||
|
||||
if (this.traitCollection.hasDifferentColorAppearanceComparedToTraitCollection(previousTraitCollection)) {
|
||||
owner.notify({ eventName: "traitCollectionColorAppearanceChanged", object: owner });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewControllerDataSource {
|
||||
|
||||
Reference in New Issue
Block a user