Преглед изворни кода

Fixes compile errors on archiving

yogevbd пре 5 година
родитељ
комит
ba77394291

+ 2
- 1
lib/ios/RNNNavigationControllerPresenter.m Прегледај датотеку

@@ -1,6 +1,7 @@
1 1
 #import "RNNNavigationControllerPresenter.h"
2 2
 #import "UINavigationController+RNNOptions.h"
3 3
 #import "RNNNavigationController.h"
4
+#import <React/RCTConvert.h>
4 5
 
5 6
 @implementation RNNNavigationControllerPresenter
6 7
 
@@ -83,7 +84,7 @@
83 84
 	}
84 85
 	
85 86
 	if (options.topBar.backButton.icon.hasValue) {
86
-		[navigationController rnn_setBackButtonIcon:[withDefault.topBar.backButton.icon getWithDefaultValue:nil] withColor:[withDefault.topBar.backButton.color getWithDefaultValue:nil] title:[withDefault.topBar.backButton.showTitle getWithDefaultValue:nil] ? withDefault.topBar.backButton.title.get : @""];
87
+		[navigationController rnn_setBackButtonIcon:[withDefault.topBar.backButton.icon getWithDefaultValue:nil] withColor:[withDefault.topBar.backButton.color getWithDefaultValue:nil] title:[withDefault.topBar.backButton.showTitle getWithDefaultValue:YES] ? [withDefault.topBar.backButton.title getWithDefaultValue:nil] : @""];
87 88
 
88 89
 	}
89 90
 	

+ 0
- 1
lib/ios/RNNNavigationOptions.h Прегледај датотеку

@@ -10,7 +10,6 @@
10 10
 #import "RNNStatusBarOptions.h"
11 11
 #import "RNNPreviewOptions.h"
12 12
 #import "RNNLayoutOptions.h"
13
-#import "RCTConvert+Modal.h"
14 13
 
15 14
 extern const NSInteger BLUR_TOPBAR_TAG;
16 15
 extern const NSInteger TOP_BAR_TRANSPARENT_TAG;

+ 1
- 1
lib/ios/RNNRootViewController.m Прегледај датотеку

@@ -217,7 +217,7 @@
217 217
 			
218 218
 			_customTopBarBackground = [[RNNCustomTitleView alloc] initWithFrame:self.navigationController.navigationBar.bounds subView:reactView alignment:@"fill"];
219 219
 			[self.navigationController.navigationBar insertSubview:_customTopBarBackground atIndex:1];
220
-		} else if (self.navigationController.navigationBar.subviews.count && [[self.navigationController.navigationBar.subviews objectAtIndex:1] isKindOfClass:[RNNCustomTitleView class]]) {
220
+		} else if (self.navigationController.navigationBar.subviews.count > 1 && [[self.navigationController.navigationBar.subviews objectAtIndex:1] isKindOfClass:[RNNCustomTitleView class]]) {
221 221
 			[[self.navigationController.navigationBar.subviews objectAtIndex:1] removeFromSuperview];
222 222
 		}
223 223
 	} if (_customTopBarBackground && _customTopBarBackground.superview == nil) {

+ 1
- 0
lib/ios/RNNViewControllerPresenter.m Прегледај датотеку

@@ -2,6 +2,7 @@
2 2
 #import "UIViewController+RNNOptions.h"
3 3
 #import "UITabBarController+RNNOptions.h"
4 4
 #import "RNNNavigationButtons.h"
5
+#import "RCTConvert+Modal.h"
5 6
 
6 7
 @interface RNNViewControllerPresenter()
7 8
 @property (nonatomic, strong) RNNNavigationButtons* navigationButtons;

+ 2
- 2
lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m Прегледај датотеку

@@ -64,7 +64,7 @@
64 64
 
65 65
 -(void)testTopBarBackgroundColorWithoutNavigationController{
66 66
 	NSNumber* inputColor = @(0xFFFF0000);
67
-	self.options.topBar.background.color = [[Color alloc] initWithValue:inputColor];
67
+	self.options.topBar.background.color = [[Color alloc] initWithValue:[RCTConvert UIColor:inputColor]];
68 68
 
69 69
 	XCTAssertNoThrow([self.uut viewWillAppear:false]);
70 70
 }
@@ -319,7 +319,7 @@
319 319
 -(void)testTopBarTextFontFamily_invalidFont{
320 320
 	NSString* inputFont = @"HelveticaNeueeeee";
321 321
 	__unused RNNNavigationController* nav = [self createNavigationController];
322
-	self.options.topBar.title.fontFamily = inputFont;
322
+	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
323 323
 	//	XCTAssertThrows([self.uut viewWillAppear:false]);
324 324
 }
325 325