Browse Source

Fixes iOS crash on overlay orientation change

yogevbd 6 years ago
parent
commit
219582efa5
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      lib/ios/RNNRootViewController.m

+ 2
- 1
lib/ios/RNNRootViewController.m View File

14
 @property (nonatomic) BOOL _statusBarHidden;
14
 @property (nonatomic) BOOL _statusBarHidden;
15
 @property (nonatomic) BOOL isExternalComponent;
15
 @property (nonatomic) BOOL isExternalComponent;
16
 @property (nonatomic) BOOL _optionsApplied;
16
 @property (nonatomic) BOOL _optionsApplied;
17
-@property (nonatomic, weak) void (^rotationBlock)(void);
17
+@property (nonatomic, copy) void (^rotationBlock)(void);
18
 @end
18
 @end
19
 
19
 
20
 @implementation RNNRootViewController
20
 @implementation RNNRootViewController
68
 -(void)viewDidDisappear:(BOOL)animated {
68
 -(void)viewDidDisappear:(BOOL)animated {
69
 	[super viewDidDisappear:animated];
69
 	[super viewDidDisappear:animated];
70
 	[self.eventEmitter sendComponentDidDisappear:self.componentId componentName:self.componentName];
70
 	[self.eventEmitter sendComponentDidDisappear:self.componentId componentName:self.componentName];
71
+	_rotationBlock = nil;
71
 }
72
 }
72
 
73
 
73
 - (void)viewDidLoad {
74
 - (void)viewDidLoad {