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,6 +18,7 @@
18 18
 @property (nonatomic, strong) NSNumber* largeTitle;
19 19
 @property (nonatomic, strong) NSString* testID;
20 20
 @property (nonatomic, strong) RNNTitleOptions* title;
21
+@property (nonatomic, strong) NSNumber* backButtonImage;
21 22
 
22 23
 @property (nonatomic, strong) NSString* componentName;
23 24
 @property (nonatomic, strong) NSString* backgroundComponentName;

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

@@ -145,6 +145,10 @@ extern const NSInteger BLUR_TOPBAR_TAG;
145 145
 		_navigationButtons = [[RNNNavigationButtons alloc] initWithViewController:(RNNRootViewController*)viewController];
146 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 154
 -(void)storeOriginalTopBarImages:(UIViewController*)viewController {