瀏覽代碼

hideBackButtonTitle support

yogevbd 7 年之前
父節點
當前提交
3dfa9542bf
共有 2 個檔案被更改,包括 5 行新增0 行删除
  1. 1
    0
      lib/ios/RNNTopBarOptions.h
  2. 4
    0
      lib/ios/RNNTopBarOptions.m

+ 1
- 0
lib/ios/RNNTopBarOptions.h 查看文件

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 查看文件

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