@@ -5,7 +5,7 @@ import { TabStrip } from '@nativescript-community/ui-material-core/tab-navigatio
5
5
import { TabStripItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip-item' ;
6
6
// Types
7
7
// Requires
8
- import { CSSType , Color , Device , Font , Frame , IOSHelper , ImageSource , Utils , View , getIconSpecSize } from '@nativescript/core' ;
8
+ import { CSSType , Color , Device , Font , Frame , IOSHelper , ImageSource , Property , Utils , View , booleanConverter , getIconSpecSize } from '@nativescript/core' ;
9
9
import { TextTransform , getTransformedText } from '@nativescript/core/ui/text-base' ;
10
10
import { iOSNativeHelper } from '@nativescript/core/utils' ;
11
11
export { TabContentItem , TabStrip , TabStripItem } ;
@@ -261,6 +261,13 @@ function updateTitleAndIconPositions(tabStripItem: TabStripItem, tabBarItem: UIT
261
261
}
262
262
}
263
263
264
+ export const iosCustomPositioningProperty = new Property < BottomNavigation , boolean > ( {
265
+ name : 'iosCustomPositioning' ,
266
+ defaultValue : false ,
267
+
268
+ valueConverter : booleanConverter
269
+ } ) ;
270
+
264
271
@CSSType ( 'BottomNavigation' )
265
272
export class BottomNavigation extends TabNavigationBase {
266
273
public viewController : UITabBarControllerImpl ;
@@ -271,10 +278,10 @@ export class BottomNavigation extends TabNavigationBase {
271
278
private _iconsCache = { } ;
272
279
private _selectedItemColor : Color ;
273
280
private _unSelectedItemColor : Color ;
281
+ public iosCustomPositioning : boolean ;
274
282
275
283
constructor ( ) {
276
284
super ( ) ;
277
-
278
285
this . viewController = this . _ios = UITabBarControllerImpl . initWithOwner ( new WeakRef ( this ) ) ;
279
286
this . nativeViewProtected = this . _ios . view ;
280
287
}
@@ -326,11 +333,15 @@ export class BottomNavigation extends TabNavigationBase {
326
333
}
327
334
328
335
public layoutNativeView ( left : number , top : number , right : number , bottom : number ) : void {
329
- //
336
+ if ( this . iosCustomPositioning ) {
337
+ super . layoutNativeView ( left , top , right , bottom ) ;
338
+ }
330
339
}
331
340
332
341
public _setNativeViewFrame ( nativeView : UIView , frame : CGRect ) {
333
- //
342
+ if ( this . iosCustomPositioning ) {
343
+ super . _setNativeViewFrame ( nativeView , frame ) ;
344
+ }
334
345
}
335
346
336
347
public onSelectedIndexChanged ( oldIndex : number , newIndex : number ) : void {
@@ -819,3 +830,4 @@ export class BottomNavigation extends TabNavigationBase {
819
830
}
820
831
}
821
832
}
833
+ iosCustomPositioningProperty . register ( BottomNavigation ) ;
0 commit comments