Browse Source

hideBackButtonTitle support

yogevbd 6 years ago
parent
commit
3dfa9542bf
2 changed files with 5 additions and 0 deletions
  1. 1
    0
      lib/ios/RNNTopBarOptions.h
  2. 4
    0
      lib/ios/RNNTopBarOptions.m

+ 1
- 0
lib/ios/RNNTopBarOptions.h View File

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

+ 4
- 0
lib/ios/RNNTopBarOptions.m View File

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