为什么我无法从操作栏访问本机 UINavigationBar?



我试图访问,但没有从操作栏中找到UINavigationBar,有人可以在那里帮助我吗?

TS 文件

let bar: ActionBar = this.page.getViewById<ActionBar>("bar");
bar.ios.nativeView // undefined
bar.nativeView // undefined

网页文件

<ActionBar id="bar" class="action-bar" title="Recipients"></ActionBar>

好的,我弄清楚我做错了什么,只是放入 Manoj 解决方案

.HTML:

<ActionBar id="bar" class="action-bar" title="Recipients" (loaded)="loadActionBar($event)"></ActionBar>

TS:

loadActionBar($event): void {
let bar: ActionBar = this.page.getViewById<ActionBar>("bar");
bar.nativeView // works
}

最新更新