From 272be9283e6844dc7a1a69e32fc517b9b2491a06 Mon Sep 17 00:00:00 2001 From: Rad Azzouz Date: Tue, 9 Mar 2021 07:20:49 -0500 Subject: [PATCH] Expose the Reader View button item on iOS (#391) * Expose the Reader View button item on iOS * Bump version to 1.30.10 --- ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m | 4 ++++ package-lock.json | 2 +- package.json | 2 +- samples/Catalog/Catalog.ios.js | 1 + samples/Catalog/package.json | 2 +- samples/NativeCatalog/package.json | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m b/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m index 99a04a17..2e263369 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+UIBarButtonItem.m @@ -40,6 +40,8 @@ + (NSString *)stringBarButtonItemFrom:(UIBarButtonItem *)barButtonItem forViewCo return @"activityButtonItem"; } else if (barButtonItem == pdfController.settingsButtonItem) { return @"settingsButtonItem"; + } else if (barButtonItem == pdfController.readerViewButtonItem) { + return @"readerViewButtonItem"; } else { return nil; } @@ -74,6 +76,8 @@ + (UIBarButtonItem *)uiBarButtonItemFrom:(NSString *)barButtonItem forViewContro return pdfController.activityButtonItem; } else if ([barButtonItem isEqualToString:@"settingsButtonItem"]) { return pdfController.settingsButtonItem; + } else if ([barButtonItem isEqualToString:@"readerViewButtonItem"]) { + return pdfController.readerViewButtonItem; } else { return nil; } diff --git a/package-lock.json b/package-lock.json index 3c8c712b..49f6d91e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.30.9", + "version": "1.30.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index aca5233e..15413259 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.30.9", + "version": "1.30.10", "description": "A React Native module for the PSPDFKit library.", "keywords": [ "react native", diff --git a/samples/Catalog/Catalog.ios.js b/samples/Catalog/Catalog.ios.js index 271827bd..f470a3f4 100644 --- a/samples/Catalog/Catalog.ios.js +++ b/samples/Catalog/Catalog.ios.js @@ -1286,6 +1286,7 @@ class ToolbarCustomization extends Component { "thumbnailsButtonItem", "searchButtonItem", "annotationButtonItem", + "readerViewButtonItem", ], "document", false diff --git a/samples/Catalog/package.json b/samples/Catalog/package.json index a7ecc5be..e9c45abc 100644 --- a/samples/Catalog/package.json +++ b/samples/Catalog/package.json @@ -1,6 +1,6 @@ { "name": "Catalog", - "version": "1.30.9", + "version": "1.30.10", "private": true, "scripts": { "start": "react-native start", diff --git a/samples/NativeCatalog/package.json b/samples/NativeCatalog/package.json index 7a4f9d74..90f5413b 100644 --- a/samples/NativeCatalog/package.json +++ b/samples/NativeCatalog/package.json @@ -1,6 +1,6 @@ { "name": "NativeCatalog", - "version": "1.30.9", + "version": "1.30.10", "private": true, "scripts": { "android": "react-native run-android",