Browse Source

backButtonImage support

yogevbd 7 years ago
parent
commit
5026a10ae9
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

18
 @property (nonatomic, strong) NSNumber* largeTitle;
18
 @property (nonatomic, strong) NSNumber* largeTitle;
19
 @property (nonatomic, strong) NSString* testID;
19
 @property (nonatomic, strong) NSString* testID;
20
 @property (nonatomic, strong) RNNTitleOptions* title;
20
 @property (nonatomic, strong) RNNTitleOptions* title;
21
+@property (nonatomic, strong) NSNumber* backButtonImage;
21
 
22
 
22
 @property (nonatomic, strong) NSString* componentName;
23
 @property (nonatomic, strong) NSString* componentName;
23
 @property (nonatomic, strong) NSString* backgroundComponentName;
24
 @property (nonatomic, strong) NSString* backgroundComponentName;

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

145
 		_navigationButtons = [[RNNNavigationButtons alloc] initWithViewController:(RNNRootViewController*)viewController];
145
 		_navigationButtons = [[RNNNavigationButtons alloc] initWithViewController:(RNNRootViewController*)viewController];
146
 		[_navigationButtons applyLeftButtons:self.leftButtons rightButtons:self.rightButtons];
146
 		[_navigationButtons applyLeftButtons:self.leftButtons rightButtons:self.rightButtons];
147
 	}
147
 	}
148
+	
149
+	UIImage *image = self.backButtonImage ? [RCTConvert UIImage:self.backButtonImage] : nil;
150
+	[[UINavigationBar appearance] setBackIndicatorImage:image];
151
+	[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:image];
148
 }
152
 }
149
 
153
 
150
 -(void)storeOriginalTopBarImages:(UIViewController*)viewController {
154
 -(void)storeOriginalTopBarImages:(UIViewController*)viewController {