Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```objective-c
- id imageInsets = tabItemLayout[@"props"][@"iconInsets"];
- if (imageInsets && imageInsets != (id)[NSNull null])
- {
- id topInset = imageInsets[@"top"];
- id leftInset = imageInsets[@"left"];
- id bottomInset = imageInsets[@"bottom"];
- id rightInset = imageInsets[@"right"];
- CGFloat top = topInset != (id)[NSNull null] ? [RCTConvert CGFloat:topInset] : 0;
- CGFloat left = topInset != (id)[NSNull null] ? [RCTConvert CGFloat:leftInset] : 0;
- CGFloat bottom = topInset != (id)[NSNull null] ? [RCTConvert CGFloat:bottomInset] : 0;
- CGFloat right = topInset != (id)[NSNull null] ? [RCTConvert CGFloat:rightInset] : 0;
- viewController.tabBarItem.imageInsets = UIEdgeInsetsMake(top, left, bottom, right);
- + viewController.tabBarItem.titlePositionAdjustment = UIOffsetMake(0, -2);
- }
- NSMutableDictionary *unselectedAttributes = [RCTHelpers textAttributesFromDictionary:tabsStyle withPrefix:@"tabBarText" baseFont:[UIFont systemFontOfSize:10]];
- if (!unselectedAttributes[NSForegroundColorAttributeName] && labelColor) {
- unselectedAttributes[NSForegroundColorAttributeName] = labelColor;
- }
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement