Skip to content

Commit eb2a80f

Browse files
authored
Merge pull request #280 from PSPDFKit/rad/dismiss-when-the-view-component-is-unmounted
Dismiss the PDF view controller when the view component is unmounted to avoid orphan popovers
2 parents 7610b84 + 64d095d commit eb2a80f

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

ios/RCTPSPDFKit/RCTPSPDFKitView.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ - (instancetype)initWithFrame:(CGRect)frame {
3838
return self;
3939
}
4040

41+
- (void)removeFromSuperview {
42+
[self.pdfController dismissViewControllerAnimated:NO completion:NULL];
43+
[super removeFromSuperview];
44+
}
45+
4146
- (void)dealloc {
4247
[self destroyViewControllerRelationship];
4348
[NSNotificationCenter.defaultCenter removeObserver:self];

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-pspdfkit",
3-
"version": "1.25.4",
3+
"version": "1.25.5",
44
"description": "A React Native module for the PSPDFKit library.",
55
"keywords": [
66
"react native",

samples/Catalog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Catalog",
3-
"version": "1.25.4",
3+
"version": "1.25.5",
44
"private": true,
55
"scripts": {
66
"start": "react-native start",

0 commit comments

Comments
 (0)