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.
Files changed (143) hide show
  1. package/ReactNativeNavigation.podspec +1 -0
  2. package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java +1 -2
  3. package/lib/android/app/src/main/java/com/reactnativenavigation/options/BackButton.java +5 -4
  4. package/lib/android/app/src/main/java/com/reactnativenavigation/options/ElementTransitionOptions.kt +0 -1
  5. package/lib/android/app/src/main/java/com/reactnativenavigation/options/HardwareBackButtonOptions.kt +2 -5
  6. package/lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutFactory.java +120 -120
  7. package/lib/android/app/src/main/java/com/reactnativenavigation/options/ValueAnimationOptions.kt +3 -3
  8. package/lib/android/app/src/main/java/com/reactnativenavigation/options/interpolators/SpringInterpolator.kt +16 -16
  9. package/lib/android/app/src/main/java/com/reactnativenavigation/options/parsers/TypefaceLoader.kt +0 -1
  10. package/lib/android/app/src/main/java/com/reactnativenavigation/react/CommandListenerAdapter.java +0 -2
  11. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java +7 -6
  12. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.kt +27 -0
  13. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactInitializer.java +50 -50
  14. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/Events.kt +34 -0
  15. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt +81 -0
  16. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalFrameLayout.kt +19 -0
  17. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalHostLayout.kt +78 -0
  18. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalLayoutController.kt +51 -0
  19. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalViewManager.kt +131 -0
  20. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/CoordinatorLayoutUtils.java +1 -1
  21. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/OutlineProvider.kt +0 -1
  22. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReflectionUtils.java +1 -1
  23. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/RenderChecker.java +1 -1
  24. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/StatusBarUtils.java +0 -2
  25. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/UiUtils.java +5 -6
  26. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ViewParent.kt +0 -3
  27. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ViewUtils.java +4 -5
  28. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenter.java +6 -8
  29. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAnimator.kt +0 -1
  30. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java +3 -3
  31. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/BottomTabsAttacher.java +1 -1
  32. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachMode.java +3 -3
  33. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/OnSwitchToTab.java +2 -2
  34. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/child/ChildController.java +1 -1
  35. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistry.java +5 -5
  36. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentPresenterBase.java +3 -0
  37. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +1 -1
  38. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenter.java +6 -6
  39. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalStack.java +18 -18
  40. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/navigator/Navigator.java +12 -12
  41. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/parent/ParentController.java +22 -22
  42. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuController.java +16 -16
  43. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuPresenter.java +4 -4
  44. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/FabPresenter.java +8 -8
  45. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/IdStack.java +14 -14
  46. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java +29 -29
  47. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerBuilder.java +3 -3
  48. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java +29 -28
  49. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarAnimator.kt +1 -0
  50. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarBackgroundViewController.java +0 -1
  51. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt +1 -1
  52. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/BackButtonHelper.java +2 -2
  53. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt +1 -1
  54. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonSpan.kt +0 -1
  55. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/IconResolver.java +0 -1
  56. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsAdapter.java +5 -4
  57. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsController.java +8 -8
  58. package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainer.kt +1 -4
  59. package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsLayout.java +0 -1
  60. package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/PropertyAnimatorCreator.kt +2 -0
  61. package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/ReactImageBoundsAnimator.kt +0 -1
  62. package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/ReactImageMatrixAnimator.kt +2 -2
  63. package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/ReactViewRotationAnimator.kt +0 -5
  64. package/lib/android/app/src/main/java/com/reactnativenavigation/views/toptabs/TopTabsLayoutCreator.java +2 -2
  65. package/lib/android/app/src/main/java/com/reactnativenavigation/views/toptabs/TopTabsViewPager.java +6 -6
  66. package/lib/android/app/src/reactNative63/java/com/reactnativenavigation/react/NavigationReactNativeHost.java +0 -1
  67. package/lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.java +23 -28
  68. package/lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java +4 -2
  69. package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentLayout.java +3 -1
  70. package/lib/android/app/src/test/java/com/reactnativenavigation/options/OptionsTest.java +9 -1
  71. package/lib/android/app/src/test/java/com/reactnativenavigation/options/TopBarButtonsTest.kt +70 -0
  72. package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/ColorParseTest.java +0 -3
  73. package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/RenderCheckerTest.java +6 -6
  74. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenterTest.java +3 -4
  75. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAttacherTest.java +1 -1
  76. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsControllerTest.java +13 -15
  77. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachModeTest.java +5 -5
  78. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllerTest.java +2 -2
  79. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistryTest.java +2 -2
  80. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenterTest.java +4 -4
  81. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalStackTest.java +10 -10
  82. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java +25 -26
  83. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/RootPresenterTest.kt +2 -2
  84. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/parent/ParentControllerTest.java +15 -15
  85. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuControllerTest.java +11 -11
  86. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/BackButtonHelperTest.java +2 -2
  87. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackAnimatorTest.kt +0 -4
  88. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.kt +15 -15
  89. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenterTest.kt +17 -17
  90. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarControllerTest.kt +3 -3
  91. package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsViewControllerTest.java +9 -9
  92. package/lib/dist/Navigation.d.ts +1 -1
  93. package/lib/dist/Navigation.js +2 -2
  94. package/lib/dist/NavigationDelegate.d.ts +1 -1
  95. package/lib/dist/NavigationDelegate.js +2 -2
  96. package/lib/dist/adapters/TouchablePreview.js +1 -0
  97. package/lib/dist/commands/Commands.d.ts +1 -1
  98. package/lib/dist/commands/Commands.js +2 -2
  99. package/lib/dist/commands/OptionsProcessor.js +12 -6
  100. package/lib/dist/components/ComponentWrapper.d.ts +1 -1
  101. package/lib/dist/components/ComponentWrapper.js +2 -2
  102. package/lib/dist/components/Modal.d.ts +20 -0
  103. package/lib/dist/components/Modal.js +93 -0
  104. package/lib/dist/components/Store.d.ts +1 -1
  105. package/lib/dist/components/Store.js +2 -2
  106. package/lib/dist/index.d.ts +1 -0
  107. package/lib/dist/index.js +1 -0
  108. package/lib/dist/interfaces/Options.d.ts +15 -0
  109. package/lib/ios/BottomTabPresenter.h +4 -1
  110. package/lib/ios/BottomTabPresenter.m +11 -3
  111. package/lib/ios/BottomTabPresenterCreator.m +11 -4
  112. package/lib/ios/BottomTabsAppearancePresenter.m +29 -4
  113. package/lib/ios/RNNBackButtonOptions.h +1 -0
  114. package/lib/ios/RNNBackButtonOptions.m +4 -1
  115. package/lib/ios/RNNBottomTabOptions.h +2 -0
  116. package/lib/ios/RNNBottomTabOptions.m +7 -1
  117. package/lib/ios/RNNBottomTabsController.m +5 -0
  118. package/lib/ios/RNNDotIndicatorPresenter.m +12 -6
  119. package/lib/ios/RNNSegmentedControl.h +1 -1
  120. package/lib/ios/RNNTabBarItemCreator.h +4 -4
  121. package/lib/ios/RNNTabBarItemCreator.m +17 -7
  122. package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +8 -24
  123. package/lib/ios/TabBarItemAppearanceCreator.m +3 -3
  124. package/lib/ios/TabBarItemIOS15Creator.h +6 -0
  125. package/lib/ios/TabBarItemIOS15Creator.m +37 -0
  126. package/lib/ios/TopBarPresenter.m +13 -3
  127. package/lib/ios/UIViewController+RNNOptions.m +7 -0
  128. package/lib/src/Navigation.ts +2 -2
  129. package/lib/src/NavigationDelegate.ts +2 -2
  130. package/lib/src/adapters/TouchablePreview.tsx +1 -1
  131. package/lib/src/commands/Commands.ts +2 -2
  132. package/lib/src/commands/OptionsProcessor.ts +12 -7
  133. package/lib/src/components/ComponentWrapper.tsx +11 -8
  134. package/lib/src/components/Modal.tsx +109 -0
  135. package/lib/src/components/Store.ts +2 -2
  136. package/lib/src/index.ts +1 -1
  137. package/lib/src/interfaces/Options.ts +15 -0
  138. package/package.json +1 -1
  139. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.java +0 -41
  140. package/lib/ios/BottomTabAppearancePresenter.h +0 -6
  141. package/lib/ios/BottomTabAppearancePresenter.m +0 -12
  142. package/lib/ios/HMSegmentedControl.h +0 -287
  143. package/lib/ios/HMSegmentedControl.m +0 -1063
@@ -1,287 +0,0 @@
1
- //
2
- // HMSegmentedControl.h
3
- // HMSegmentedControl
4
- //
5
- // Created by Hesham Abd-Elmegid on 23/12/12.
6
- // Copyright (c) 2012-2015 Hesham Abd-Elmegid. All rights reserved.
7
- //
8
-
9
- #import <UIKit/UIKit.h>
10
-
11
- @class HMSegmentedControl;
12
-
13
- typedef void (^IndexChangeBlock)(NSInteger index);
14
- typedef NSAttributedString * (^HMTitleFormatterBlock)(HMSegmentedControl *segmentedControl,
15
- NSString *title, NSUInteger index,
16
- BOOL selected);
17
-
18
- typedef NS_ENUM(NSInteger, HMSegmentedControlSelectionStyle) {
19
- HMSegmentedControlSelectionStyleTextWidthStripe, // Indicator width will
20
- // only be as big as the
21
- // text width
22
- HMSegmentedControlSelectionStyleFullWidthStripe, // Indicator width will
23
- // fill the whole segment
24
- HMSegmentedControlSelectionStyleBox, // A rectangle that covers the whole
25
- // segment
26
- HMSegmentedControlSelectionStyleArrow // An arrow in the middle of the
27
- // segment pointing up or down
28
- // depending on the indicator location
29
- };
30
-
31
- typedef NS_ENUM(NSInteger, HMSegmentedControlSelectionIndicatorLocation) {
32
- HMSegmentedControlSelectionIndicatorLocationUp,
33
- HMSegmentedControlSelectionIndicatorLocationDown,
34
- HMSegmentedControlSelectionIndicatorLocationNone // No selection indicator
35
- };
36
-
37
- typedef NS_ENUM(NSInteger, HMSegmentedControlSegmentWidthStyle) {
38
- HMSegmentedControlSegmentWidthStyleFixed, // Segment width is fixed
39
- HMSegmentedControlSegmentWidthStyleDynamic, // Segment width will only be as
40
- // big as the text width
41
- // (including inset)
42
- };
43
-
44
- typedef NS_OPTIONS(NSInteger, HMSegmentedControlBorderType) {
45
- HMSegmentedControlBorderTypeNone = 0,
46
- HMSegmentedControlBorderTypeTop = (1 << 0),
47
- HMSegmentedControlBorderTypeLeft = (1 << 1),
48
- HMSegmentedControlBorderTypeBottom = (1 << 2),
49
- HMSegmentedControlBorderTypeRight = (1 << 3)
50
- };
51
-
52
- enum {
53
- HMSegmentedControlNoSegment = -1 // Segment index for no selected segment
54
- };
55
-
56
- typedef NS_ENUM(NSInteger, HMSegmentedControlType) {
57
- HMSegmentedControlTypeText,
58
- HMSegmentedControlTypeImages,
59
- HMSegmentedControlTypeTextImages
60
- };
61
-
62
- typedef NS_ENUM(NSInteger, HMSegmentedControlImagePosition) {
63
- HMSegmentedControlImagePositionBehindText,
64
- HMSegmentedControlImagePositionLeftOfText,
65
- HMSegmentedControlImagePositionRightOfText,
66
- HMSegmentedControlImagePositionAboveText,
67
- HMSegmentedControlImagePositionBelowText
68
- };
69
-
70
- @interface HMSegmentedControl : UIControl
71
-
72
- @property(nonatomic, strong) NSArray<NSString *> *sectionTitles;
73
- @property(nonatomic, strong) NSArray<UIImage *> *sectionImages;
74
- @property(nonatomic, strong) NSArray<UIImage *> *sectionSelectedImages;
75
-
76
- /**
77
- Provide a block to be executed when selected index is changed.
78
-
79
- Alternativly, you could use `addTarget:action:forControlEvents:`
80
- */
81
- @property(nonatomic, copy) IndexChangeBlock indexChangeBlock;
82
-
83
- /**
84
- Used to apply custom text styling to titles when set.
85
-
86
- When this block is set, no additional styling is applied to the
87
- `NSAttributedString` object returned from this block.
88
- */
89
- @property(nonatomic, copy) HMTitleFormatterBlock titleFormatter;
90
-
91
- /**
92
- Text attributes to apply to item title text.
93
- */
94
- @property(nonatomic, strong) NSDictionary *titleTextAttributes UI_APPEARANCE_SELECTOR;
95
-
96
- /*
97
- Text attributes to apply to selected item title text.
98
-
99
- Attributes not set in this dictionary are inherited from `titleTextAttributes`.
100
- */
101
- @property(nonatomic, strong) NSDictionary *selectedTitleTextAttributes UI_APPEARANCE_SELECTOR;
102
-
103
- /**
104
- Segmented control background color.
105
-
106
- Default is `[UIColor whiteColor]`
107
- */
108
- @property(nonatomic, strong) UIColor *backgroundColor UI_APPEARANCE_SELECTOR;
109
-
110
- /**
111
- Color for the selection indicator stripe
112
-
113
- Default is `R:52, G:181, B:229`
114
- */
115
- @property(nonatomic, strong) UIColor *selectionIndicatorColor UI_APPEARANCE_SELECTOR;
116
-
117
- /**
118
- Color for the selection indicator box
119
-
120
- Default is selectionIndicatorColor
121
- */
122
- @property(nonatomic, strong) UIColor *selectionIndicatorBoxColor UI_APPEARANCE_SELECTOR;
123
-
124
- /**
125
- Color for the vertical divider between segments.
126
-
127
- Default is `[UIColor blackColor]`
128
- */
129
- @property(nonatomic, strong) UIColor *verticalDividerColor UI_APPEARANCE_SELECTOR;
130
-
131
- /**
132
- Opacity for the seletion indicator box.
133
-
134
- Default is `0.2f`
135
- */
136
- @property(nonatomic) CGFloat selectionIndicatorBoxOpacity;
137
-
138
- /**
139
- Width the vertical divider between segments that is added when
140
- `verticalDividerEnabled` is set to YES.
141
-
142
- Default is `1.0f`
143
- */
144
- @property(nonatomic, assign) CGFloat verticalDividerWidth;
145
-
146
- /**
147
- Specifies the style of the control
148
-
149
- Default is `HMSegmentedControlTypeText`
150
- */
151
- @property(nonatomic, assign) HMSegmentedControlType type;
152
-
153
- /**
154
- Specifies the style of the selection indicator.
155
-
156
- Default is `HMSegmentedControlSelectionStyleTextWidthStripe`
157
- */
158
- @property(nonatomic, assign) HMSegmentedControlSelectionStyle selectionStyle;
159
-
160
- /**
161
- Specifies the style of the segment's width.
162
-
163
- Default is `HMSegmentedControlSegmentWidthStyleFixed`
164
- */
165
- @property(nonatomic, assign) HMSegmentedControlSegmentWidthStyle segmentWidthStyle;
166
-
167
- /**
168
- Specifies the location of the selection indicator.
169
-
170
- Default is `HMSegmentedControlSelectionIndicatorLocationUp`
171
- */
172
- @property(nonatomic, assign)
173
- HMSegmentedControlSelectionIndicatorLocation selectionIndicatorLocation;
174
-
175
- /*
176
- Specifies the border type.
177
-
178
- Default is `HMSegmentedControlBorderTypeNone`
179
- */
180
- @property(nonatomic, assign) HMSegmentedControlBorderType borderType;
181
-
182
- /**
183
- Specifies the image position relative to the text. Only applicable for
184
- HMSegmentedControlTypeTextImages
185
-
186
- Default is `HMSegmentedControlImagePositionBehindText`
187
- */
188
- @property(nonatomic) HMSegmentedControlImagePosition imagePosition;
189
-
190
- /**
191
- Specifies the distance between the text and the image. Only applicable for
192
- HMSegmentedControlTypeTextImages
193
-
194
- Default is `0,0`
195
- */
196
- @property(nonatomic) CGFloat textImageSpacing;
197
-
198
- /**
199
- Specifies the border color.
200
-
201
- Default is `[UIColor blackColor]`
202
- */
203
- @property(nonatomic, strong) UIColor *borderColor;
204
-
205
- /**
206
- Specifies the border width.
207
-
208
- Default is `1.0f`
209
- */
210
- @property(nonatomic, assign) CGFloat borderWidth;
211
-
212
- /**
213
- Default is YES. Set to NO to deny scrolling by dragging the scrollView by the
214
- user.
215
- */
216
- @property(nonatomic, getter=isUserDraggable) BOOL userDraggable;
217
-
218
- /**
219
- Default is YES. Set to NO to deny any touch events by the user.
220
- */
221
- @property(nonatomic, getter=isTouchEnabled) BOOL touchEnabled;
222
-
223
- /**
224
- Default is NO. Set to YES to show a vertical divider between the segments.
225
- */
226
- @property(nonatomic, getter=isVerticalDividerEnabled) BOOL verticalDividerEnabled;
227
-
228
- @property(nonatomic, getter=shouldStretchSegmentsToScreenSize) BOOL stretchSegmentsToScreenSize;
229
-
230
- /**
231
- Index of the currently selected segment.
232
- */
233
- @property(nonatomic, assign) NSInteger selectedSegmentIndex;
234
-
235
- /**
236
- Height of the selection indicator. Only effective when
237
- `HMSegmentedControlSelectionStyle` is either
238
- `HMSegmentedControlSelectionStyleTextWidthStripe` or
239
- `HMSegmentedControlSelectionStyleFullWidthStripe`.
240
-
241
- Default is 5.0
242
- */
243
- @property(nonatomic, readwrite) CGFloat selectionIndicatorHeight;
244
-
245
- /**
246
- Edge insets for the selection indicator.
247
- NOTE: This does not affect the bounding box of
248
- HMSegmentedControlSelectionStyleBox
249
-
250
- When HMSegmentedControlSelectionIndicatorLocationUp is selected, bottom edge
251
- insets are not used
252
-
253
- When HMSegmentedControlSelectionIndicatorLocationDown is selected, top edge
254
- insets are not used
255
-
256
- Defaults are top: 0.0f
257
- left: 0.0f
258
- bottom: 0.0f
259
- right: 0.0f
260
- */
261
- @property(nonatomic, readwrite) UIEdgeInsets selectionIndicatorEdgeInsets;
262
-
263
- /**
264
- Inset left and right edges of segments.
265
-
266
- Default is UIEdgeInsetsMake(0, 5, 0, 5)
267
- */
268
- @property(nonatomic, readwrite) UIEdgeInsets segmentEdgeInset;
269
-
270
- @property(nonatomic, readwrite) UIEdgeInsets enlargeEdgeInset;
271
-
272
- /**
273
- Default is YES. Set to NO to disable animation during user selection.
274
- */
275
- @property(nonatomic) BOOL shouldAnimateUserSelection;
276
-
277
- - (id)initWithSectionTitles:(NSArray<NSString *> *)sectiontitles;
278
- - (id)initWithSectionImages:(NSArray<UIImage *> *)sectionImages
279
- sectionSelectedImages:(NSArray<UIImage *> *)sectionSelectedImages;
280
- - (instancetype)initWithSectionImages:(NSArray<UIImage *> *)sectionImages
281
- sectionSelectedImages:(NSArray<UIImage *> *)sectionSelectedImages
282
- titlesForSections:(NSArray<NSString *> *)sectiontitles;
283
- - (void)setSelectedSegmentIndex:(NSUInteger)index animated:(BOOL)animated;
284
- - (void)setIndexChangeBlock:(IndexChangeBlock)indexChangeBlock;
285
- - (void)setTitleFormatter:(HMTitleFormatterBlock)titleFormatter;
286
-
287
- @end