Skip to content

Commit 96709e0

Browse files
authored
Merge pull request #209 from nativescript-community/bug/bottomnavigationbar-selected
fix: default tab select on iOS v8
2 parents 5478dce + 73549eb commit 96709e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bottomnavigationbar/bottomnavigationbar.ios.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ export class BottomNavigationBar extends BottomNavigationBarBase {
141141
});
142142
this.nativeViewProtected.items = new NSArray({ array: bottomNavigationTabs });
143143

144-
this.nativeViewProtected.selectedItem = this.nativeViewProtected.items[this.selectedTabIndex];
144+
// TODO: this is for he v8 runtime. Should not have to need this setTimeout(), find better way.
145+
setTimeout(() => {
146+
this.nativeViewProtected.selectedItem = this.nativeViewProtected.items[this.selectedTabIndex];
147+
}, 0);
145148
}
146149

147150
protected selectTabNative(index: number): void {

0 commit comments

Comments
 (0)