Fix crash on iOS when reloading page from remote Safari
This closes #110
This commit is contained in:
parent
d65c0c7cc5
commit
0a8b5be3d1
@ -142,8 +142,16 @@
|
||||
_curImageName = nil;
|
||||
|
||||
self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion
|
||||
@try {
|
||||
[self.viewController.view removeObserver:self forKeyPath:@"frame"];
|
||||
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
|
||||
}
|
||||
@catch (NSException *exception) {
|
||||
// When reloading the page from a remotely connected Safari, there
|
||||
// are no observers, so the removeObserver method throws an exception,
|
||||
// that we can safely ignore.
|
||||
// Alternatively we can check whether there are observers before calling removeObserver
|
||||
}
|
||||
}
|
||||
|
||||
- (CDV_iOSDevice) getCurrentDevice
|
||||
|
Loading…
x
Reference in New Issue
Block a user