mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
Add nativeView in page.ios.ts and get the UIViewControler view as nativeView
This commit is contained in:
@ -326,13 +326,21 @@ class UIViewControllerImpl extends UIViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Page extends PageBase {
|
export class Page extends PageBase {
|
||||||
private _ios = UIViewControllerImpl.initWithOwner(new WeakRef(this));
|
public nativeView: UIView;
|
||||||
|
|
||||||
|
private _ios: UIViewControllerImpl;
|
||||||
public _enableLoadedEvents: boolean;
|
public _enableLoadedEvents: boolean;
|
||||||
public _modalParent: Page;
|
public _modalParent: Page;
|
||||||
public _UIModalPresentationFormSheet: boolean;
|
public _UIModalPresentationFormSheet: boolean;
|
||||||
public _viewWillDisappear: boolean;
|
public _viewWillDisappear: boolean;
|
||||||
public _presentedViewController: UIViewController; // used when our page present native viewController without going through our abstraction.
|
public _presentedViewController: UIViewController; // used when our page present native viewController without going through our abstraction.
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this._ios = UIViewControllerImpl.initWithOwner(new WeakRef(this));
|
||||||
|
this.nativeView = this._ios.view;
|
||||||
|
}
|
||||||
|
|
||||||
public requestLayout(): void {
|
public requestLayout(): void {
|
||||||
super.requestLayout();
|
super.requestLayout();
|
||||||
if (!this.parent && this.ios && this._nativeView) {
|
if (!this.parent && this.ios && this._nativeView) {
|
||||||
|
Reference in New Issue
Block a user