Ver código fonte

hideBackButtonTitle support

yogevbd 6 anos atrás
pai
commit
3dfa9542bf
2 arquivos alterados com 5 adições e 0 exclusões
  1. 1
    0
      lib/ios/RNNTopBarOptions.h
  2. 4
    0
      lib/ios/RNNTopBarOptions.m

+ 1
- 0
lib/ios/RNNTopBarOptions.h Ver arquivo

@@ -21,6 +21,7 @@
21 21
 @property (nonatomic, strong) NSNumber* backButtonImage;
22 22
 @property (nonatomic, strong) NSNumber* backButtonHidden;
23 23
 @property (nonatomic, strong) NSString* backButtonTitle;
24
+@property (nonatomic, strong) NSNumber* hideBackButtonTitle;
24 25
 
25 26
 @property (nonatomic, strong) NSString* componentName;
26 27
 @property (nonatomic, strong) NSString* backgroundComponentName;

+ 4
- 0
lib/ios/RNNTopBarOptions.m Ver arquivo

@@ -150,6 +150,10 @@ extern const NSInteger BLUR_TOPBAR_TAG;
150 150
 	[[UINavigationBar appearance] setBackIndicatorImage:image];
151 151
 	[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:image];
152 152
 	
153
+	if (self.hideBackButtonTitle) {
154
+		self.backButtonTitle = @"";
155
+	}
156
+	
153 157
 	if (self.backButtonTitle) {
154 158
 		UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:self.backButtonTitle
155 159
 																	 style:UIBarButtonItemStylePlain