react-native-navigation 7.21.0 → 7.22.0-snapshot.1649
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactNativeNavigation.podspec +1 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java +1 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/BackButton.java +5 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/ElementTransitionOptions.kt +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/HardwareBackButtonOptions.kt +2 -5
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutFactory.java +120 -120
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/ValueAnimationOptions.kt +3 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/interpolators/SpringInterpolator.kt +16 -16
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/parsers/TypefaceLoader.kt +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/CommandListenerAdapter.java +0 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java +7 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.kt +27 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactInitializer.java +50 -50
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/Events.kt +34 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt +81 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalFrameLayout.kt +19 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalHostLayout.kt +78 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalLayoutController.kt +51 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalViewManager.kt +131 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/CoordinatorLayoutUtils.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/OutlineProvider.kt +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReflectionUtils.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/RenderChecker.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/StatusBarUtils.java +0 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java +5 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ViewParent.kt +0 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ViewUtils.java +4 -5
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenter.java +6 -8
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAnimator.kt +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java +3 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/BottomTabsAttacher.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachMode.java +3 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/OnSwitchToTab.java +2 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/child/ChildController.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistry.java +5 -5
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentPresenterBase.java +3 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenter.java +6 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalStack.java +18 -18
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/navigator/Navigator.java +12 -12
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/parent/ParentController.java +22 -22
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuController.java +16 -16
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuPresenter.java +4 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/FabPresenter.java +8 -8
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/IdStack.java +14 -14
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java +29 -29
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerBuilder.java +3 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java +29 -28
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarAnimator.kt +1 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarBackgroundViewController.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/BackButtonHelper.java +2 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonSpan.kt +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/IconResolver.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsAdapter.java +5 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsController.java +8 -8
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainer.kt +1 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsLayout.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/PropertyAnimatorCreator.kt +2 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/ReactImageBoundsAnimator.kt +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/ReactImageMatrixAnimator.kt +2 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/ReactViewRotationAnimator.kt +0 -5
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/toptabs/TopTabsLayoutCreator.java +2 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/toptabs/TopTabsViewPager.java +6 -6
- package/lib/android/app/src/reactNative63/java/com/reactnativenavigation/react/NavigationReactNativeHost.java +0 -1
- package/lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.java +23 -28
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java +4 -2
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentLayout.java +3 -1
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OptionsTest.java +9 -1
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TopBarButtonsTest.kt +70 -0
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/ColorParseTest.java +0 -3
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/RenderCheckerTest.java +6 -6
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenterTest.java +3 -4
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAttacherTest.java +1 -1
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsControllerTest.java +13 -15
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachModeTest.java +5 -5
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllerTest.java +2 -2
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistryTest.java +2 -2
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenterTest.java +4 -4
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalStackTest.java +10 -10
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java +25 -26
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/RootPresenterTest.kt +2 -2
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/parent/ParentControllerTest.java +15 -15
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuControllerTest.java +11 -11
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/BackButtonHelperTest.java +2 -2
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackAnimatorTest.kt +0 -4
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.kt +15 -15
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenterTest.kt +17 -17
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarControllerTest.kt +3 -3
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsViewControllerTest.java +9 -9
- package/lib/dist/Navigation.d.ts +1 -1
- package/lib/dist/Navigation.js +2 -2
- package/lib/dist/NavigationDelegate.d.ts +1 -1
- package/lib/dist/NavigationDelegate.js +2 -2
- package/lib/dist/adapters/TouchablePreview.js +1 -0
- package/lib/dist/commands/Commands.d.ts +1 -1
- package/lib/dist/commands/Commands.js +2 -2
- package/lib/dist/commands/OptionsProcessor.js +12 -6
- package/lib/dist/components/ComponentWrapper.d.ts +1 -1
- package/lib/dist/components/ComponentWrapper.js +2 -2
- package/lib/dist/components/Modal.d.ts +20 -0
- package/lib/dist/components/Modal.js +93 -0
- package/lib/dist/components/Store.d.ts +1 -1
- package/lib/dist/components/Store.js +2 -2
- package/lib/dist/index.d.ts +1 -0
- package/lib/dist/index.js +1 -0
- package/lib/dist/interfaces/Options.d.ts +15 -0
- package/lib/ios/BottomTabPresenter.h +4 -1
- package/lib/ios/BottomTabPresenter.m +11 -3
- package/lib/ios/BottomTabPresenterCreator.m +11 -4
- package/lib/ios/BottomTabsAppearancePresenter.m +29 -4
- package/lib/ios/RNNBackButtonOptions.h +1 -0
- package/lib/ios/RNNBackButtonOptions.m +4 -1
- package/lib/ios/RNNBottomTabOptions.h +2 -0
- package/lib/ios/RNNBottomTabOptions.m +7 -1
- package/lib/ios/RNNBottomTabsController.m +5 -0
- package/lib/ios/RNNDotIndicatorPresenter.m +12 -6
- package/lib/ios/RNNSegmentedControl.h +1 -1
- package/lib/ios/RNNTabBarItemCreator.h +4 -4
- package/lib/ios/RNNTabBarItemCreator.m +17 -7
- package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +8 -24
- package/lib/ios/TabBarItemAppearanceCreator.m +3 -3
- package/lib/ios/TabBarItemIOS15Creator.h +6 -0
- package/lib/ios/TabBarItemIOS15Creator.m +37 -0
- package/lib/ios/TopBarPresenter.m +13 -3
- package/lib/ios/UIViewController+RNNOptions.m +7 -0
- package/lib/src/Navigation.ts +2 -2
- package/lib/src/NavigationDelegate.ts +2 -2
- package/lib/src/adapters/TouchablePreview.tsx +1 -1
- package/lib/src/commands/Commands.ts +2 -2
- package/lib/src/commands/OptionsProcessor.ts +12 -7
- package/lib/src/components/ComponentWrapper.tsx +11 -8
- package/lib/src/components/Modal.tsx +109 -0
- package/lib/src/components/Store.ts +2 -2
- package/lib/src/index.ts +1 -1
- package/lib/src/interfaces/Options.ts +15 -0
- package/package.json +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.java +0 -41
- package/lib/ios/BottomTabAppearancePresenter.h +0 -6
- package/lib/ios/BottomTabAppearancePresenter.m +0 -12
- package/lib/ios/HMSegmentedControl.h +0 -287
- package/lib/ios/HMSegmentedControl.m +0 -1063
|
@@ -48,7 +48,7 @@ export declare class NavigationDelegate {
|
|
|
48
48
|
/**
|
|
49
49
|
* Update a mounted component's props
|
|
50
50
|
*/
|
|
51
|
-
updateProps(componentId: string, props: object): void;
|
|
51
|
+
updateProps(componentId: string, props: object, callback?: () => void): void;
|
|
52
52
|
/**
|
|
53
53
|
* Show a screen as a modal.
|
|
54
54
|
*/
|
|
@@ -63,8 +63,8 @@ class NavigationDelegate {
|
|
|
63
63
|
/**
|
|
64
64
|
* Update a mounted component's props
|
|
65
65
|
*/
|
|
66
|
-
updateProps(componentId, props) {
|
|
67
|
-
this.concreteNavigation.updateProps(componentId, props);
|
|
66
|
+
updateProps(componentId, props, callback) {
|
|
67
|
+
this.concreteNavigation.updateProps(componentId, props, callback);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Show a screen as a modal.
|
|
@@ -23,7 +23,7 @@ export declare class Commands {
|
|
|
23
23
|
setRoot(simpleApi: LayoutRoot): Promise<any>;
|
|
24
24
|
setDefaultOptions(options: Options): void;
|
|
25
25
|
mergeOptions(componentId: string, options: Options): void;
|
|
26
|
-
updateProps(componentId: string, props: object): void;
|
|
26
|
+
updateProps(componentId: string, props: object, callback?: () => void): void;
|
|
27
27
|
showModal(layout: Layout): Promise<any>;
|
|
28
28
|
dismissModal(componentId: string, mergeOptions?: Options): Promise<any>;
|
|
29
29
|
dismissAllModals(mergeOptions?: Options): Promise<any>;
|
|
@@ -63,8 +63,8 @@ class Commands {
|
|
|
63
63
|
this.nativeCommandsSender.mergeOptions(componentId, input);
|
|
64
64
|
this.commandsObserver.notify(CommandName_1.CommandName.MergeOptions, { componentId, options });
|
|
65
65
|
}
|
|
66
|
-
updateProps(componentId, props) {
|
|
67
|
-
this.store.updateProps(componentId, props);
|
|
66
|
+
updateProps(componentId, props, callback) {
|
|
67
|
+
this.store.updateProps(componentId, props, callback);
|
|
68
68
|
this.commandsObserver.notify(CommandName_1.CommandName.UpdateProps, { componentId, props });
|
|
69
69
|
}
|
|
70
70
|
showModal(layout) {
|
|
@@ -73,14 +73,20 @@ class OptionsProcessor {
|
|
|
73
73
|
options[key] = 'NoColor';
|
|
74
74
|
}
|
|
75
75
|
else if (value instanceof Object) {
|
|
76
|
-
if ('
|
|
77
|
-
options[key]
|
|
78
|
-
|
|
76
|
+
if ('semantic' in value) {
|
|
77
|
+
options[key] = value;
|
|
78
|
+
}
|
|
79
|
+
else if ('dynamic' in value) {
|
|
80
|
+
options[key] = react_native_1.DynamicColorIOS({
|
|
81
|
+
light: this.colorService.toNativeColor(value.dynamic.light),
|
|
82
|
+
dark: this.colorService.toNativeColor(value.dynamic.dark),
|
|
83
|
+
});
|
|
79
84
|
}
|
|
80
85
|
else {
|
|
81
|
-
options[key]
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
options[key] = react_native_1.DynamicColorIOS({
|
|
87
|
+
light: this.colorService.toNativeColor(value.light),
|
|
88
|
+
dark: this.colorService.toNativeColor(value.dark)
|
|
89
|
+
});
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
else {
|
|
@@ -3,7 +3,7 @@ import { ComponentProvider } from 'react-native';
|
|
|
3
3
|
import { Store } from './Store';
|
|
4
4
|
import { ComponentEventsObserver } from '../events/ComponentEventsObserver';
|
|
5
5
|
export interface IWrappedComponent extends React.Component {
|
|
6
|
-
setProps(newProps: Record<string, any
|
|
6
|
+
setProps(newProps: Record<string, any>, callback?: () => void): void;
|
|
7
7
|
isMounted: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare class ComponentWrapper {
|
|
@@ -30,13 +30,13 @@ class ComponentWrapper {
|
|
|
30
30
|
get isMounted() {
|
|
31
31
|
return this._isMounted;
|
|
32
32
|
}
|
|
33
|
-
setProps(newProps) {
|
|
33
|
+
setProps(newProps, callback) {
|
|
34
34
|
this.setState((prevState) => ({
|
|
35
35
|
allProps: {
|
|
36
36
|
...prevState.allProps,
|
|
37
37
|
...newProps,
|
|
38
38
|
},
|
|
39
|
-
}));
|
|
39
|
+
}), callback);
|
|
40
40
|
}
|
|
41
41
|
componentDidMount() {
|
|
42
42
|
this._isMounted = true;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
export interface RNNModalProps extends ViewProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
transparent: boolean;
|
|
6
|
+
blurOnUnmount: boolean;
|
|
7
|
+
animationType: 'none' | 'fade' | 'slide';
|
|
8
|
+
onShow?: () => any;
|
|
9
|
+
onRequestClose: () => any;
|
|
10
|
+
}
|
|
11
|
+
export declare class Modal extends React.Component<RNNModalProps> {
|
|
12
|
+
static defaultProps: {
|
|
13
|
+
transparent: boolean;
|
|
14
|
+
blurOnUnmount: boolean;
|
|
15
|
+
animationType: string;
|
|
16
|
+
};
|
|
17
|
+
constructor(props: RNNModalProps);
|
|
18
|
+
render(): JSX.Element | null;
|
|
19
|
+
private proccessProps;
|
|
20
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Modal = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const react_native_ui_lib_1 = require("react-native-ui-lib");
|
|
8
|
+
const RNNModalViewManager = react_native_1.requireNativeComponent('RNNModalViewManager');
|
|
9
|
+
class Modal extends react_1.default.Component {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
const processed = this.proccessProps();
|
|
15
|
+
if (this.props.visible) {
|
|
16
|
+
return (react_1.default.createElement(RNNModalViewManager, Object.assign({}, processed),
|
|
17
|
+
react_1.default.createElement(react_native_ui_lib_1.View, { style: styles.container, collapsable: false }, this.props.children)));
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
proccessProps() {
|
|
24
|
+
const processed = { ...this.props, style: styles.modal };
|
|
25
|
+
if (this.props.animationType === 'none') {
|
|
26
|
+
processed.animation = {
|
|
27
|
+
showModal: { enabled: false },
|
|
28
|
+
dismissModal: { enabled: false },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const isSlide = this.props.animationType === 'slide';
|
|
33
|
+
processed.animation = {
|
|
34
|
+
showModal: {
|
|
35
|
+
enter: isSlide ? showModalSlideEnterAnimations : showModalFadeEnterAnimations,
|
|
36
|
+
},
|
|
37
|
+
dismissModal: {
|
|
38
|
+
exit: isSlide ? dismissModalSlideExitAnimations : dismissModalFadeExitAnimations,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return processed;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Modal = Modal;
|
|
46
|
+
Modal.defaultProps = {
|
|
47
|
+
transparent: false,
|
|
48
|
+
blurOnUnmount: false,
|
|
49
|
+
animationType: 'slide',
|
|
50
|
+
};
|
|
51
|
+
const height = Math.round(react_native_1.Dimensions.get('window').height);
|
|
52
|
+
const SCREEN_ANIMATION_DURATION = 500;
|
|
53
|
+
const showModalSlideEnterAnimations = {
|
|
54
|
+
translationY: {
|
|
55
|
+
from: height,
|
|
56
|
+
to: 0,
|
|
57
|
+
duration: SCREEN_ANIMATION_DURATION,
|
|
58
|
+
interpolation: { type: 'decelerate' },
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
const dismissModalSlideExitAnimations = {
|
|
62
|
+
translationY: {
|
|
63
|
+
from: 0,
|
|
64
|
+
to: height,
|
|
65
|
+
duration: SCREEN_ANIMATION_DURATION,
|
|
66
|
+
interpolation: { type: 'decelerate' },
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const showModalFadeEnterAnimations = {
|
|
70
|
+
alpha: {
|
|
71
|
+
from: 0,
|
|
72
|
+
to: 1,
|
|
73
|
+
duration: SCREEN_ANIMATION_DURATION,
|
|
74
|
+
interpolation: { type: 'decelerate' },
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
const dismissModalFadeExitAnimations = {
|
|
78
|
+
alpha: {
|
|
79
|
+
from: 1,
|
|
80
|
+
to: 0,
|
|
81
|
+
duration: SCREEN_ANIMATION_DURATION,
|
|
82
|
+
interpolation: { type: 'decelerate' },
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
const styles = react_native_1.StyleSheet.create({
|
|
86
|
+
modal: {
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
},
|
|
89
|
+
container: {
|
|
90
|
+
top: 0,
|
|
91
|
+
flex: 1,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
@@ -7,7 +7,7 @@ export declare class Store {
|
|
|
7
7
|
private componentsInstancesById;
|
|
8
8
|
private wrappedComponents;
|
|
9
9
|
private lazyRegistratorFn;
|
|
10
|
-
updateProps(componentId: string, props: any): void;
|
|
10
|
+
updateProps(componentId: string, props: any, callback?: () => void): void;
|
|
11
11
|
getPropsForId(componentId: string): any;
|
|
12
12
|
mergeNewPropsForId(componentId: string, newProps: any): void;
|
|
13
13
|
clearComponent(componentId: string): void;
|
|
@@ -8,11 +8,11 @@ class Store {
|
|
|
8
8
|
this.componentsInstancesById = {};
|
|
9
9
|
this.wrappedComponents = {};
|
|
10
10
|
}
|
|
11
|
-
updateProps(componentId, props) {
|
|
11
|
+
updateProps(componentId, props, callback) {
|
|
12
12
|
this.mergeNewPropsForId(componentId, props);
|
|
13
13
|
const component = this.componentsInstancesById[componentId];
|
|
14
14
|
if (component) {
|
|
15
|
-
this.componentsInstancesById[componentId].setProps(props);
|
|
15
|
+
this.componentsInstancesById[componentId].setProps(props, callback);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
getPropsForId(componentId) {
|
package/lib/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NavigationDelegate } from './NavigationDelegate';
|
|
2
2
|
export declare const Navigation: NavigationDelegate;
|
|
3
|
+
export * from './components/Modal';
|
|
3
4
|
export * from './events/EventsRegistry';
|
|
4
5
|
export * from './adapters/Constants';
|
|
5
6
|
export * from './interfaces/ComponentEvents';
|
package/lib/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const NavigationDelegate_1 = require("./NavigationDelegate");
|
|
6
6
|
const navigationDelegate = new NavigationDelegate_1.NavigationDelegate();
|
|
7
7
|
exports.Navigation = navigationDelegate;
|
|
8
|
+
tslib_1.__exportStar(require("./components/Modal"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./events/EventsRegistry"), exports);
|
|
9
10
|
tslib_1.__exportStar(require("./adapters/Constants"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./interfaces/ComponentEvents"), exports);
|
|
@@ -283,6 +283,11 @@ export interface OptionsTopBarBackButton {
|
|
|
283
283
|
* Image to show as the back button
|
|
284
284
|
*/
|
|
285
285
|
icon?: ImageResource;
|
|
286
|
+
/**
|
|
287
|
+
* SF Symbol to show as the back button
|
|
288
|
+
* #### (iOS 13+ specific)
|
|
289
|
+
*/
|
|
290
|
+
sfSymbol?: string;
|
|
286
291
|
/**
|
|
287
292
|
* Weither the back button is visible or not
|
|
288
293
|
* @default true
|
|
@@ -930,6 +935,16 @@ export interface OptionsBottomTab {
|
|
|
930
935
|
* #### (Android specific)
|
|
931
936
|
*/
|
|
932
937
|
popToRoot?: boolean;
|
|
938
|
+
/**
|
|
939
|
+
* Set the SF symbol as icon (will be used primarily)
|
|
940
|
+
* #### (iOS 13+ specific)
|
|
941
|
+
*/
|
|
942
|
+
sfSymbol?: string;
|
|
943
|
+
/**
|
|
944
|
+
* Set the SF symbol as selected icon (will be used primarily)
|
|
945
|
+
* #### (iOS 13+ specific)
|
|
946
|
+
*/
|
|
947
|
+
sfSelectedSymbol?: string;
|
|
933
948
|
}
|
|
934
949
|
export interface SideMenuSide {
|
|
935
950
|
/**
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#import "RNNBasePresenter.h"
|
|
2
|
-
|
|
2
|
+
#import "RNNTabBarItemCreator.h"
|
|
3
3
|
@interface BottomTabPresenter : RNNBasePresenter
|
|
4
4
|
|
|
5
|
+
- (instancetype)initWithDefaultOptions:(RNNNavigationOptions *)defaultOptions
|
|
6
|
+
tabCreator:(RNNTabBarItemCreator *)tabCreator;
|
|
7
|
+
|
|
5
8
|
- (void)applyOptions:(RNNNavigationOptions *)options child:(UIViewController *)child;
|
|
6
9
|
|
|
7
10
|
- (void)applyOptionsOnWillMoveToParentViewController:(RNNNavigationOptions *)options
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
#import "UIViewController+LayoutProtocol.h"
|
|
4
4
|
#import "UIViewController+RNNOptions.h"
|
|
5
5
|
|
|
6
|
-
@implementation BottomTabPresenter
|
|
6
|
+
@implementation BottomTabPresenter {
|
|
7
|
+
RNNTabBarItemCreator *_tabCreator;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
- (instancetype)initWithDefaultOptions:(RNNNavigationOptions *)defaultOptions
|
|
11
|
+
tabCreator:(RNNTabBarItemCreator *)tabCreator {
|
|
12
|
+
self = [super initWithDefaultOptions:defaultOptions];
|
|
13
|
+
_tabCreator = tabCreator;
|
|
14
|
+
return self;
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
- (void)applyOptions:(RNNNavigationOptions *)options child:(UIViewController *)child {
|
|
9
18
|
RNNNavigationOptions *withDefault = [options withDefault:self.defaultOptions];
|
|
@@ -37,8 +46,7 @@
|
|
|
37
46
|
|
|
38
47
|
- (void)createTabBarItem:(UIViewController *)child
|
|
39
48
|
bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions {
|
|
40
|
-
child.tabBarItem = [
|
|
41
|
-
mergeItem:child.tabBarItem];
|
|
49
|
+
child.tabBarItem = [_tabCreator createTabBarItem:bottomTabOptions mergeItem:child.tabBarItem];
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
@end
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
#import "BottomTabPresenterCreator.h"
|
|
2
|
-
#import "
|
|
2
|
+
#import "RNNTabBarItemCreator.h"
|
|
3
|
+
#import "TabBarItemAppearanceCreator.h"
|
|
4
|
+
#import "TabBarItemIOS15Creator.h"
|
|
3
5
|
|
|
4
6
|
@implementation BottomTabPresenterCreator
|
|
5
7
|
|
|
6
8
|
+ (BottomTabPresenter *)createWithDefaultOptions:(RNNNavigationOptions *)defaultOptions {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
RNNTabBarItemCreator *tabCreator;
|
|
10
|
+
if (@available(iOS 15.0, *)) {
|
|
11
|
+
tabCreator = [TabBarItemIOS15Creator new];
|
|
12
|
+
} else if (@available(iOS 13.0, *)) {
|
|
13
|
+
tabCreator = [TabBarItemAppearanceCreator new];
|
|
9
14
|
} else {
|
|
10
|
-
|
|
15
|
+
tabCreator = [RNNTabBarItemCreator new];
|
|
11
16
|
}
|
|
17
|
+
|
|
18
|
+
return [[BottomTabPresenter alloc] initWithDefaultOptions:defaultOptions tabCreator:tabCreator];
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
@end
|
|
@@ -28,8 +28,14 @@
|
|
|
28
28
|
|
|
29
29
|
- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
|
|
30
30
|
[self setTabBarOpaqueBackground];
|
|
31
|
-
for (UIViewController *childViewController in self.tabBarController.childViewControllers)
|
|
31
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
32
32
|
childViewController.tabBarItem.standardAppearance.backgroundColor = backgroundColor;
|
|
33
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
34
|
+
if (@available(iOS 15.0, *)) {
|
|
35
|
+
childViewController.tabBarItem.scrollEdgeAppearance.backgroundColor = backgroundColor;
|
|
36
|
+
}
|
|
37
|
+
#endif
|
|
38
|
+
}
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
- (void)setTabBarTranslucent:(BOOL)translucent {
|
|
@@ -46,18 +52,37 @@
|
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
- (void)setTabBarTranslucentBackground {
|
|
49
|
-
for (UIViewController *childViewController in self.tabBarController.childViewControllers)
|
|
55
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
50
56
|
[childViewController.tabBarItem.standardAppearance configureWithDefaultBackground];
|
|
57
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
58
|
+
if (@available(iOS 15.0, *)) {
|
|
59
|
+
[childViewController.tabBarItem.scrollEdgeAppearance configureWithDefaultBackground];
|
|
60
|
+
}
|
|
61
|
+
#endif
|
|
62
|
+
}
|
|
51
63
|
}
|
|
52
64
|
|
|
53
65
|
- (void)setTabBarTransparentBackground {
|
|
54
|
-
for (UIViewController *childViewController in self.tabBarController.childViewControllers)
|
|
66
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
55
67
|
[childViewController.tabBarItem.standardAppearance configureWithTransparentBackground];
|
|
68
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
69
|
+
if (@available(iOS 15.0, *)) {
|
|
70
|
+
[childViewController.tabBarItem
|
|
71
|
+
.scrollEdgeAppearance configureWithTransparentBackground];
|
|
72
|
+
}
|
|
73
|
+
#endif
|
|
74
|
+
}
|
|
56
75
|
}
|
|
57
76
|
|
|
58
77
|
- (void)setTabBarOpaqueBackground {
|
|
59
|
-
for (UIViewController *childViewController in self.tabBarController.childViewControllers)
|
|
78
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
60
79
|
[childViewController.tabBarItem.standardAppearance configureWithOpaqueBackground];
|
|
80
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
81
|
+
if (@available(iOS 15.0, *)) {
|
|
82
|
+
[childViewController.tabBarItem.scrollEdgeAppearance configureWithOpaqueBackground];
|
|
83
|
+
}
|
|
84
|
+
#endif
|
|
85
|
+
}
|
|
61
86
|
}
|
|
62
87
|
|
|
63
88
|
@end
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@interface RNNBackButtonOptions : RNNOptions
|
|
4
4
|
|
|
5
5
|
@property(nonatomic, strong) Image *icon;
|
|
6
|
+
@property(nonatomic, strong) Text *sfSymbol;
|
|
6
7
|
@property(nonatomic, strong) Text *title;
|
|
7
8
|
@property(nonatomic, strong) Text *fontFamily;
|
|
8
9
|
@property(nonatomic, strong) Number *fontSize;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
self.identifier = [TextParser parse:dict key:@"identifier"];
|
|
9
9
|
self.icon = [ImageParser parse:dict key:@"icon"];
|
|
10
|
+
self.sfSymbol = [TextParser parse:dict key:@"sfSymbol"];
|
|
10
11
|
self.title = [TextParser parse:dict key:@"title"];
|
|
11
12
|
self.transition = [TextParser parse:dict key:@"transition"];
|
|
12
13
|
self.color = [ColorParser parse:dict key:@"color"];
|
|
@@ -49,12 +50,14 @@
|
|
|
49
50
|
self.displayMode = options.displayMode;
|
|
50
51
|
if (options.popStackOnPress.hasValue)
|
|
51
52
|
self.popStackOnPress = options.popStackOnPress;
|
|
53
|
+
if (options.sfSymbol.hasValue)
|
|
54
|
+
self.sfSymbol = options.sfSymbol;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
- (BOOL)hasValue {
|
|
55
58
|
return self.icon.hasValue || self.showTitle.hasValue || self.color.hasValue ||
|
|
56
59
|
self.fontFamily.hasValue || self.fontSize.hasValue || self.title.hasValue ||
|
|
57
|
-
self.enableMenu.hasValue || self.displayMode.hasValue;
|
|
60
|
+
self.enableMenu.hasValue || self.displayMode.hasValue || self.sfSymbol.hasValue;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
@end
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
@property(nonatomic, strong) Number *fontSize;
|
|
24
24
|
@property(nonatomic, strong) Bool *visible;
|
|
25
25
|
@property(nonatomic, strong) Bool *selectTabOnPress;
|
|
26
|
+
@property(nonatomic, strong) Text *sfSymbol;
|
|
27
|
+
@property(nonatomic, strong) Text *sfSelectedSymbol;
|
|
26
28
|
|
|
27
29
|
- (BOOL)hasValue;
|
|
28
30
|
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
self.fontSize = [NumberParser parse:dict key:@"fontSize"];
|
|
30
30
|
self.visible = [BoolParser parse:dict key:@"visible"];
|
|
31
31
|
self.selectTabOnPress = [BoolParser parse:dict key:@"selectTabOnPress"];
|
|
32
|
+
self.sfSymbol = [TextParser parse:dict key:@"sfSymbol"];
|
|
33
|
+
self.sfSelectedSymbol = [TextParser parse:dict key:@"sfSelectedSymbol"];
|
|
32
34
|
|
|
33
35
|
return self;
|
|
34
36
|
}
|
|
@@ -70,6 +72,10 @@
|
|
|
70
72
|
self.visible = options.visible;
|
|
71
73
|
if (options.selectTabOnPress.hasValue)
|
|
72
74
|
self.selectTabOnPress = options.selectTabOnPress;
|
|
75
|
+
if (options.sfSymbol.hasValue)
|
|
76
|
+
self.sfSymbol = options.sfSymbol;
|
|
77
|
+
if (options.sfSelectedSymbol.hasValue)
|
|
78
|
+
self.sfSelectedSymbol = options.sfSelectedSymbol;
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
- (BOOL)hasValue {
|
|
@@ -78,7 +84,7 @@
|
|
|
78
84
|
self.testID.hasValue || self.icon.hasValue || self.selectedIcon.hasValue ||
|
|
79
85
|
self.iconColor.hasValue || self.selectedIconColor.hasValue ||
|
|
80
86
|
self.selectedTextColor.hasValue || self.iconInsets.hasValue || self.textColor.hasValue ||
|
|
81
|
-
self.visible.hasValue || self.selectTabOnPress.hasValue;
|
|
87
|
+
self.visible.hasValue || self.selectTabOnPress.hasValue || self.sfSymbol.hasValue || self.sfSelectedSymbol.hasValue;
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
@end
|
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
if (@available(iOS 13.0, *)) {
|
|
41
41
|
self.tabBar.standardAppearance = [UITabBarAppearance new];
|
|
42
42
|
}
|
|
43
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
44
|
+
if (@available(iOS 15.0, *)) {
|
|
45
|
+
self.tabBar.scrollEdgeAppearance = [UITabBarAppearance new];
|
|
46
|
+
}
|
|
47
|
+
#endif
|
|
43
48
|
|
|
44
49
|
self.longPressRecognizer =
|
|
45
50
|
[[UILongPressGestureRecognizer alloc] initWithTarget:self
|
|
@@ -49,12 +49,18 @@
|
|
|
49
49
|
if ([self hasIndicator:child])
|
|
50
50
|
[self remove:child];
|
|
51
51
|
|
|
52
|
+
UITabBarController *bottomTabs = [self getTabBarController:child];
|
|
53
|
+
int index = (int)[[bottomTabs childViewControllers] indexOfObject:child];
|
|
54
|
+
UIView *tabIcon = [bottomTabs getTabIcon:index];
|
|
55
|
+
|
|
56
|
+
if (!tabIcon) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
52
60
|
UIView *indicator = [self createIndicator:options];
|
|
53
61
|
[child tabBarItem].tag = indicator.tag;
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
int index = (int)[[bottomTabs childViewControllers] indexOfObject:child];
|
|
57
|
-
[[bottomTabs getTabView:index] addSubview:indicator];
|
|
63
|
+
[tabIcon addSubview:indicator];
|
|
58
64
|
[self applyConstraints:options badge:indicator tabBar:bottomTabs index:index];
|
|
59
65
|
}
|
|
60
66
|
|
|
@@ -85,14 +91,14 @@
|
|
|
85
91
|
if (![self hasIndicator:child])
|
|
86
92
|
return NO;
|
|
87
93
|
UIView *currentIndicator = [self getCurrentIndicator:child];
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
|
|
95
|
+
return [[currentIndicator backgroundColor] isEqual:[options.color withDefault:[UIColor redColor]]];
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
- (UIView *)getCurrentIndicator:(UIViewController *)child {
|
|
93
99
|
UITabBarController *bottomTabs = [self getTabBarController:child];
|
|
94
100
|
int tabIndex = (int)[[bottomTabs childViewControllers] indexOfObject:child];
|
|
95
|
-
return [[bottomTabs
|
|
101
|
+
return [[bottomTabs getTabIcon:tabIndex] viewWithTag:[child tabBarItem].tag];
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
- (BOOL)hasIndicator:(UIViewController *)child {
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
@interface RNNTabBarItemCreator : NSObject
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- (UITabBarItem *)createTabBarItem:(RNNBottomTabOptions *)bottomTabOptions
|
|
8
8
|
mergeItem:(UITabBarItem *)mergeItem;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
- (UITabBarItem *)createTabBarItem:(UITabBarItem *)mergeItem;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
- (void)setTitleAttributes:(UITabBarItem *)tabItem titleAttributes:(NSDictionary *)titleAttributes;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- (void)setSelectedTitleAttributes:(UITabBarItem *)tabItem
|
|
15
15
|
selectedTitleAttributes:(NSDictionary *)selectedTitleAttributes;
|
|
16
16
|
|
|
17
17
|
@end
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
@implementation RNNTabBarItemCreator
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- (UITabBarItem *)createTabBarItem:(UITabBarItem *)mergeItem {
|
|
8
8
|
return [UITabBarItem new];
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- (UITabBarItem *)createTabBarItem:(RNNBottomTabOptions *)bottomTabOptions
|
|
12
12
|
mergeItem:(UITabBarItem *)mergeItem {
|
|
13
13
|
UITabBarItem *tabItem = [self createTabBarItem:mergeItem];
|
|
14
14
|
UIImage *icon = [bottomTabOptions.icon withDefault:nil];
|
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
UIColor *iconColor = [bottomTabOptions.iconColor withDefault:nil];
|
|
17
17
|
UIColor *selectedIconColor = [bottomTabOptions.selectedIconColor withDefault:iconColor];
|
|
18
18
|
|
|
19
|
+
if (@available(iOS 13.0, *)) {
|
|
20
|
+
if (bottomTabOptions.sfSymbol.hasValue) {
|
|
21
|
+
icon = [UIImage systemImageNamed: [bottomTabOptions.sfSymbol withDefault:nil]];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (bottomTabOptions.sfSelectedSymbol.hasValue) {
|
|
25
|
+
selectedIcon = [UIImage systemImageNamed: [bottomTabOptions.sfSelectedSymbol withDefault:nil]];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
19
29
|
tabItem.image = [self getIconImage:icon withTint:iconColor];
|
|
20
30
|
tabItem.selectedImage = [self getSelectedIconImage:selectedIcon
|
|
21
31
|
selectedIconColor:selectedIconColor];
|
|
@@ -44,7 +54,7 @@
|
|
|
44
54
|
return tabItem;
|
|
45
55
|
}
|
|
46
56
|
|
|
47
|
-
|
|
57
|
+
- (UIImage *)getSelectedIconImage:(UIImage *)selectedIcon
|
|
48
58
|
selectedIconColor:(UIColor *)selectedIconColor {
|
|
49
59
|
if (selectedIcon) {
|
|
50
60
|
if (selectedIconColor) {
|
|
@@ -58,7 +68,7 @@
|
|
|
58
68
|
return nil;
|
|
59
69
|
}
|
|
60
70
|
|
|
61
|
-
|
|
71
|
+
- (UIImage *)getIconImage:(UIImage *)icon withTint:(UIColor *)tintColor {
|
|
62
72
|
if (icon) {
|
|
63
73
|
if (tintColor) {
|
|
64
74
|
return [[icon withTintColor:tintColor]
|
|
@@ -71,7 +81,7 @@
|
|
|
71
81
|
return nil;
|
|
72
82
|
}
|
|
73
83
|
|
|
74
|
-
|
|
84
|
+
- (void)appendTitleAttributes:(UITabBarItem *)tabItem
|
|
75
85
|
bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions {
|
|
76
86
|
UIColor *textColor = [bottomTabOptions.textColor withDefault:[UIColor blackColor]];
|
|
77
87
|
UIColor *selectedTextColor =
|
|
@@ -97,11 +107,11 @@
|
|
|
97
107
|
[self setTitleAttributes:tabItem titleAttributes:normalAttributes];
|
|
98
108
|
}
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
- (void)setTitleAttributes:(UITabBarItem *)tabItem titleAttributes:(NSDictionary *)titleAttributes {
|
|
101
111
|
[tabItem setTitleTextAttributes:titleAttributes forState:UIControlStateNormal];
|
|
102
112
|
}
|
|
103
113
|
|
|
104
|
-
|
|
114
|
+
- (void)setSelectedTitleAttributes:(UITabBarItem *)tabItem
|
|
105
115
|
selectedTitleAttributes:(NSDictionary *)selectedTitleAttributes {
|
|
106
116
|
[tabItem setTitleTextAttributes:selectedTitleAttributes forState:UIControlStateSelected];
|
|
107
117
|
}
|