mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
b48149ed94
Summary: Exposes barStyle property. Code already existed in RCTConvert, so that’s why there’s no conversion code here. Closes https://github.com/facebook/react-native/pull/10936 Differential Revision: D4224759 Pulled By: shergin fbshipit-source-id: b6346940e69933d42a21cd38b9a2fa75d049f8e6
45 lines
1.1 KiB
Objective-C
45 lines
1.1 KiB
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "RCTTabBarManager.h"
|
|
|
|
#import "RCTBridge.h"
|
|
#import "RCTTabBar.h"
|
|
|
|
@implementation RCTConvert (UITabBar)
|
|
|
|
RCT_ENUM_CONVERTER(UITabBarItemPositioning, (@{
|
|
@"fill" : @(UITabBarItemPositioningFill),
|
|
@"auto" : @(UITabBarItemPositioningAutomatic),
|
|
@"center" : @(UITabBarItemPositioningCentered)
|
|
}), UITabBarItemPositioningAutomatic, integerValue)
|
|
|
|
@end
|
|
|
|
@implementation RCTTabBarManager
|
|
|
|
RCT_EXPORT_MODULE()
|
|
|
|
- (UIView *)view
|
|
{
|
|
return [RCTTabBar new];
|
|
}
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(unselectedTintColor, UIColor)
|
|
RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
|
|
RCT_EXPORT_VIEW_PROPERTY(barTintColor, UIColor)
|
|
RCT_EXPORT_VIEW_PROPERTY(translucent, BOOL)
|
|
#if !TARGET_OS_TV
|
|
RCT_EXPORT_VIEW_PROPERTY(barStyle, UIBarStyle)
|
|
#endif
|
|
RCT_EXPORT_VIEW_PROPERTY(itemPositioning, UITabBarItemPositioning)
|
|
RCT_EXPORT_VIEW_PROPERTY(unselectedItemTintColor, UIColor)
|
|
|
|
@end
|