소스 검색

backButtonImage support

yogevbd 7 년 전
부모
커밋
5026a10ae9
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      lib/ios/RNNTopBarOptions.h
  2. 4
    0
      lib/ios/RNNTopBarOptions.m

+ 1
- 0
lib/ios/RNNTopBarOptions.h 파일 보기

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 파일 보기

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 {