Skip to content

Commit 50b76d6

Browse files
authored
Merge pull request #50 from PSPDFKit/rad/update-to-pspdfkit7
Update to PSPDFKit 7
2 parents 2c672ef + f19e290 commit 50b76d6

File tree

5 files changed

+234
-475
lines changed

5 files changed

+234
-475
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ profile
1616
*.moved-aside
1717
DerivedData
1818
.idea/
19-
PSPDFKit.framework
19+
PSPDFKit.framework
20+
PSPDFKitUI.framework

CordovaDemo/platforms/ios/CordovaDemo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
7365018C711546588CBCB485 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F0D11BA37CC404CA67DE9B7 /* AVFoundation.framework */; };
1919
7D7629B8885B4ADEB3B6C087 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DFE9F4B80E04CB5992AF3D1 /* QuickLook.framework */; };
2020
7F84DF7FB1E749EBB22B187A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC528BED4D54989859A215A /* QuartzCore.framework */; };
21+
8404071D1F6C202F006FE22B /* PSPDFKitUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8404071C1F6C2028006FE22B /* PSPDFKitUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2122
9103AA7F4FAA4747B215AC56 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4EEB4D7A3A4E8F801CE242 /* CoreData.framework */; };
2223
91AF4C80CF5E43C29C04808D /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B507FF90814A0BA027B581 /* MediaPlayer.framework */; };
2324
9761D785297842648262D3BE /* PSPDFKitPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E636A6106D4BB9A8C37203 /* PSPDFKitPlugin.m */; };
@@ -59,6 +60,7 @@
5960
dstSubfolderSpec = 10;
6061
files = (
6162
B954CAC31DD394BA001A80C4 /* PSPDFKit.framework in Embed Frameworks */,
63+
8404071D1F6C202F006FE22B /* PSPDFKitUI.framework in Embed Frameworks */,
6264
);
6365
name = "Embed Frameworks";
6466
runOnlyForDeploymentPostprocessing = 0;
@@ -94,6 +96,7 @@
9496
6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = CordovaDemo/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; };
9597
7104B2EC580B49C89216BCBB /* MessageUI.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
9698
7E4EEB4D7A3A4E8F801CE242 /* CoreData.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
99+
8404071C1F6C2028006FE22B /* PSPDFKitUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PSPDFKitUI.framework; sourceTree = "<group>"; };
97100
8D1107310486CEB800E47090 /* CordovaDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "CordovaDemo-Info.plist"; path = "CordovaDemo/CordovaDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; };
98101
9B1BE461EE714905B87F91F5 /* AudioToolbox.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
99102
B954CAC11DD394BA001A80C4 /* PSPDFKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PSPDFKit.framework; sourceTree = "<group>"; };
@@ -199,6 +202,7 @@
199202
isa = PBXGroup;
200203
children = (
201204
B954CAC11DD394BA001A80C4 /* PSPDFKit.framework */,
205+
8404071C1F6C2028006FE22B /* PSPDFKitUI.framework */,
202206
5E9CFF5B5B4242508F1D76D9 /* CoreText.framework */,
203207
3BC528BED4D54989859A215A /* QuartzCore.framework */,
204208
7104B2EC580B49C89216BCBB /* MessageUI.framework */,

CordovaDemo/platforms/ios/CordovaDemo/Plugins/com.pspdfkit.cordovaplugin/PSPDFKitPlugin.m

Lines changed: 36 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#import "PSPDFKitPlugin.h"
1414
#import <WebKit/WebKit.h>
1515
#import <PSPDFKit/PSPDFKit.h>
16+
#import <PSPDFKitUI/PSPDFKitUI.h>
1617

1718
@interface PSPDFKitPlugin () <PSPDFViewControllerDelegate, PSPDFFlexibleToolbarContainerDelegate>
1819

@@ -544,7 +545,7 @@ - (NSDictionary *)enumValuesOfType:(NSString *)type
544545

545546
@"PSPDFPageTransition":
546547

547-
@{@"scrollPerPage": @(PSPDFPageTransitionScrollPerPage),
548+
@{@"scrollPerSpread": @(PSPDFPageTransitionScrollPerSpread),
548549
@"scrollContinuous": @(PSPDFPageTransitionScrollContinuous),
549550
@"curl": @(PSPDFPageTransitionCurl)},
550551

@@ -571,18 +572,18 @@ - (NSDictionary *)enumValuesOfType:(NSString *)type
571572
@"openSafari": @(PSPDFLinkActionOpenSafari),
572573
@"inlineBrowser": @(PSPDFLinkActionInlineBrowser)},
573574

574-
@"PSPDFHUDViewMode":
575+
@"PSPDFUserInterfaceViewMode":
575576

576-
@{@"always": @(PSPDFHUDViewModeAlways),
577-
@"automatic": @(PSPDFHUDViewModeAutomatic),
578-
@"automaticNoFirstLastPage": @(PSPDFHUDViewModeAutomaticNoFirstLastPage),
579-
@"never": @(PSPDFHUDViewModeNever)},
577+
@{@"always": @(PSPDFUserInterfaceViewModeAlways),
578+
@"automatic": @(PSPDFUserInterfaceViewModeAutomatic),
579+
@"automaticNoFirstLastPage": @(PSPDFUserInterfaceViewModeAutomaticNoFirstLastPage),
580+
@"never": @(PSPDFUserInterfaceViewModeNever)},
580581

581-
@"PSPDFHUDViewAnimation":
582+
@"PSPDFUserInterfaceViewAnimation":
582583

583-
@{@"none": @(PSPDFHUDViewAnimationNone),
584-
@"fade": @(PSPDFHUDViewAnimationFade),
585-
@"slide": @(PSPDFHUDViewAnimationSlide)},
584+
@{@"none": @(PSPDFUserInterfaceViewAnimationNone),
585+
@"fade": @(PSPDFUserInterfaceViewAnimationFade),
586+
@"slide": @(PSPDFUserInterfaceViewAnimationSlide)},
586587

587588
@"PSPDFThumbnailBarMode":
588589

@@ -654,25 +655,6 @@ - (NSDictionary *)enumValuesOfType:(NSString *)type
654655
return enumsByType[type];
655656
}
656657

657-
///// Status bar style. (old status will be restored regardless of the style chosen)
658-
//typedef NS_ENUM(NSInteger, PSPDFStatusBarStyleSetting) {
659-
// PSPDFStatusBarInherit, // Don't change status bar style, but show/hide statusbar on HUD events.
660-
// PSPDFStatusBarSmartBlack, // UIStatusBarStyleBlackOpaque on iPad, UIStatusBarStyleBlackTranslucent on iPhone.
661-
// PSPDFStatusBarSmartBlackHideOnIpad,// Similar to PSPDFStatusBarSmartBlack, but also hides statusBar on iPad.
662-
// PSPDFStatusBarBlackOpaque, // Opaque Black everywhere.
663-
// PSPDFStatusBarDefault, // Default statusbar (white on iPhone/black on iPad).
664-
// PSPDFStatusBarDisable, // Never show status bar.
665-
//};
666-
667-
//// Customize how a single page should be displayed.
668-
//typedef NS_ENUM(NSInteger, PSPDFPageRenderingMode) {
669-
// PSPDFPageRenderingModeThumbnailThenFullPage, // Load cached page async.
670-
// PSPDFPageRenderingModeFullPage, // Load cached page async, no upscaled thumb.
671-
// PSPDFPageRenderingModeFullPageBlocking, // Load cached page directly.
672-
// PSPDFPageRenderingModeThumbnailThenRender, // Don't use cached page but thumb.
673-
// PSPDFPageRenderingModeRender // Don't use cached page nor thumb.
674-
//};
675-
676658
#pragma mark License Key
677659

678660
- (void)setLicenseKey:(CDVInvokedUrlCommand *)command {
@@ -768,7 +750,7 @@ - (void)setRenderAnnotationTypesForPSPDFDocumentWithJSON:(NSArray *)options
768750

769751
- (void)setPageTransitionForPSPDFViewControllerWithJSON:(NSString *)transition
770752
{
771-
PSPDFPageTransition pageTransition = (PSPDFPageTransition) [self enumValueForKey:transition ofType:@"PSPDFPageTransition" withDefault:PSPDFPageTransitionScrollPerPage];
753+
PSPDFPageTransition pageTransition = (PSPDFPageTransition) [self enumValueForKey:transition ofType:@"PSPDFPageTransition" withDefault:PSPDFPageTransitionScrollPerSpread];
772754
[_pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
773755
builder.pageTransition = pageTransition;
774756
}];
@@ -846,35 +828,35 @@ - (NSString *)linkActionAsJSON
846828
return [self enumKeyForValue:_pdfController.configuration.linkAction ofType:@"PSPDFLinkAction"];
847829
}
848830

849-
- (void)setHUDViewModeForPSPDFViewControllerWithJSON:(NSString *)mode
831+
- (void)setUserInterfaceViewModeForPSPDFViewControllerWithJSON:(NSString *)mode
850832
{
851-
PSPDFHUDViewMode HUDViewMode = (PSPDFHUDViewMode) [self enumValueForKey:mode ofType:@"PSPDFHUDViewMode" withDefault:PSPDFHUDViewModeAutomatic];
833+
PSPDFUserInterfaceViewMode userInterfaceViewMode = (PSPDFUserInterfaceViewMode) [self enumValueForKey:mode ofType:@"PSPDFUserInterfaceViewMode" withDefault:PSPDFUserInterfaceViewModeAutomatic];
852834
[_pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
853-
builder.HUDViewMode = HUDViewMode;
835+
builder.userInterfaceViewMode = userInterfaceViewMode;
854836
}];
855837
}
856838

857-
- (NSString *)HUDViewModeAsJSON
839+
- (NSString *)userInterfaceViewModeAsJSON
858840
{
859-
return [self enumKeyForValue:_pdfController.configuration.HUDViewMode ofType:@"PSPDFHUDViewMode"];
841+
return [self enumKeyForValue:_pdfController.configuration.userInterfaceViewMode ofType:@"PSPDFUserInterfaceViewMode"];
860842
}
861843

862-
- (void)setHUDViewAnimationForPSPDFViewControllerWithJSON:(NSString *)mode
844+
- (void)setUserInterfaceViewAnimationForPSPDFViewControllerWithJSON:(NSString *)mode
863845
{
864-
PSPDFHUDViewAnimation HUDViewAnimation = (PSPDFHUDViewAnimation) [self enumValueForKey:mode ofType:@"HUDViewAnimation" withDefault:PSPDFHUDViewAnimationFade];
846+
PSPDFUserInterfaceViewAnimation userInterfaceViewAnimation = (PSPDFUserInterfaceViewAnimation) [self enumValueForKey:mode ofType:@"UserInterfaceViewAnimation" withDefault:PSPDFUserInterfaceViewAnimationFade];
865847
[_pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
866-
builder.HUDViewAnimation = HUDViewAnimation;
848+
builder.userInterfaceViewAnimation = userInterfaceViewAnimation;
867849
}];
868850
}
869851

870-
- (NSString *)HUDViewAnimationAsJSON
852+
- (NSString *)userInterfaceViewAnimationAsJSON
871853
{
872-
return [self enumKeyForValue:_pdfController.configuration.HUDViewAnimation ofType:@"PSPDFHUDViewAnimation"];
854+
return [self enumKeyForValue:_pdfController.configuration.userInterfaceViewAnimation ofType:@"PSPDFUserInterfaceViewAnimation"];
873855
}
874856

875-
- (void)setHUDVisibleAnimatedForPSPDFViewControllerWithJSON:(NSNumber *)visible
857+
- (void)setUserInterfaceVisibleAnimatedForPSPDFViewControllerWithJSON:(NSNumber *)visible
876858
{
877-
[_pdfController setHUDVisible:[visible boolValue] animated:YES];
859+
[_pdfController setUserInterfaceVisible:[visible boolValue] animated:YES];
878860
}
879861

880862
- (void)setPageAnimatedForPSPDFViewControllerWithJSON:(NSNumber *)page
@@ -1027,7 +1009,7 @@ - (void)present:(CDVInvokedUrlCommand *)command {
10271009
if (path) {
10281010
//configure document
10291011
NSURL *url = [self pdfFileURLWithPath:path];
1030-
_pdfDocument = [PSPDFDocument documentWithURL:url];
1012+
_pdfDocument = [[PSPDFDocument alloc] initWithURL:url];
10311013
[self setOptions:newOptions forObject:_pdfDocument animated:NO];
10321014
}
10331015

@@ -1097,7 +1079,7 @@ - (void)search:(CDVInvokedUrlCommand *)command
10971079
- (void)saveAnnotations:(CDVInvokedUrlCommand *)command
10981080
{
10991081
// Completion handler is called on the main queue
1100-
[_pdfController.document saveWithCompletionHandler:^(NSError *error, NSArray<PSPDFAnnotation *> *savedAnnotations) {
1082+
[_pdfController.document saveWithOptions:nil completionHandler:^(NSError * _Nullable error, NSArray<__kindof PSPDFAnnotation *> * _Nonnull savedAnnotations) {
11011083
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[self dictionaryWithError:error]] callbackId:command.callbackId];
11021084
}];
11031085
}
@@ -1229,15 +1211,15 @@ - (void)getPageCount:(CDVInvokedUrlCommand *)command
12291211
- (void)scrollToNextPage:(CDVInvokedUrlCommand *)command
12301212
{
12311213
BOOL animated = [[command argumentAtIndex:0 withDefault:@NO] boolValue];
1232-
[_pdfController scrollToNextPageAnimated:animated];
1214+
[_pdfController.documentViewController scrollToNextSpreadAnimated:animated];
12331215
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK]
12341216
callbackId:command.callbackId];
12351217
}
12361218

12371219
- (void)scrollToPreviousPage:(CDVInvokedUrlCommand *)command
12381220
{
12391221
BOOL animated = [[command argumentAtIndex:0 withDefault:@NO] boolValue];
1240-
[_pdfController scrollToPreviousPageAnimated:animated];
1222+
[_pdfController.documentViewController scrollToNextSpreadAnimated:animated];
12411223
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK]
12421224
callbackId:command.callbackId];
12431225
}
@@ -1324,31 +1306,6 @@ - (void)pdfViewController:(PSPDFViewController *)pdfController didBeginPageDragg
13241306
[self sendEventWithJSON:@"{type:'didBeginPageDragging'}"];
13251307
}
13261308

1327-
- (void)pdfViewController:(PSPDFViewController *)pdfController didEndPageDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
1328-
{
1329-
[self sendEventWithJSON:[NSString stringWithFormat:@"{type:'didBeginPageDragging',willDecelerate:'%@',velocity:'{%g,%g}'}", decelerate? @"true": @"false", velocity.x, velocity.y]];
1330-
}
1331-
1332-
- (void)pdfViewController:(PSPDFViewController *)pdfController didEndPageScrollingAnimation:(UIScrollView *)scrollView
1333-
{
1334-
[self sendEventWithJSON:@"{type:'didEndPageScrollingAnimation'}"];
1335-
}
1336-
1337-
- (void)pdfViewController:(PSPDFViewController *)pdfController didBeginPageZooming:(UIScrollView *)scrollView
1338-
{
1339-
[self sendEventWithJSON:@"{type:'didBeginPageZooming'}"];
1340-
}
1341-
1342-
- (void)pdfViewController:(PSPDFViewController *)pdfController didEndPageZooming:(UIScrollView *)scrollView atScale:(CGFloat)scale
1343-
{
1344-
[self sendEventWithJSON:[NSString stringWithFormat:@"{type:'didEndPageZooming',scale:%g}", scale]];
1345-
}
1346-
1347-
//- (PSPDFDocument *)pdfViewController:(PSPDFViewController *)pdfController documentForRelativePath:(NSString *)relativePath
1348-
//{
1349-
//
1350-
//}
1351-
13521309
- (BOOL)pdfViewController:(PSPDFViewController *)pdfController didTapOnPageView:(PSPDFPageView *)pageView atPoint:(CGPoint)viewPoint
13531310
{
13541311
// inverted because it's almost always YES (due to handling JS eval calls).
@@ -1377,76 +1334,6 @@ - (void)pdfViewController:(PSPDFViewController *)pdfController didSelectText:(NS
13771334
[self sendEventWithJSON:@{@"type": @"didSelectText", @"text": text, @"rect": PSPDFStringFromCGRect(rect)}];
13781335
}
13791336

1380-
//- (NSArray *)pdfViewController:(PSPDFViewController *)pdfController shouldShowMenuItems:(NSArray *)menuItems atSuggestedTargetRect:(CGRect)rect forSelectedText:(NSString *)selectedText inRect:(CGRect)textRect onPageView:(PSPDFPageView *)pageView
1381-
//{
1382-
//
1383-
//}
1384-
1385-
//- (NSArray *)pdfViewController:(PSPDFViewController *)pdfController shouldShowMenuItems:(NSArray *)menuItems atSuggestedTargetRect:(CGRect)rect forSelectedImage:(PSPDFImageInfo *)selectedImage inRect:(CGRect)textRect onPageView:(PSPDFPageView *)pageView
1386-
//{
1387-
//
1388-
//}
1389-
1390-
//- (NSArray *)pdfViewController:(PSPDFViewController *)pdfController shouldShowMenuItems:(NSArray *)menuItems atSuggestedTargetRect:(CGRect)rect forAnnotation:(PSPDFAnnotation *)annotation inRect:(CGRect)annotationRect onPageView:(PSPDFPageView *)pageView
1391-
//{
1392-
//
1393-
//}
1394-
1395-
//- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldDisplayAnnotation:(PSPDFAnnotation *)annotation onPageView:(PSPDFPageView *)pageView
1396-
//{
1397-
//
1398-
//}
1399-
1400-
//- (BOOL)pdfViewController:(PSPDFViewController *)pdfController didTapOnAnnotation:(PSPDFAnnotation *)annotation annotationPoint:(CGPoint)annotationPoint annotationView:(UIView <PSPDFAnnotationViewProtocol> *)annotationView pageView:(PSPDFPageView *)pageView viewPoint:(CGPoint)viewPoint
1401-
//{
1402-
//
1403-
//}
1404-
1405-
//- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldSelectAnnotation:(PSPDFAnnotation *)annotation onPageView:(PSPDFPageView *)pageView
1406-
//{
1407-
//
1408-
//}
1409-
1410-
//- (void)pdfViewController:(PSPDFViewController *)pdfController didSelectAnnotation:(PSPDFAnnotation *)annotation onPageView:(PSPDFPageView *)pageView
1411-
//{
1412-
//
1413-
//}
1414-
1415-
//- (UIView <PSPDFAnnotationViewProtocol> *)pdfViewController:(PSPDFViewController *)pdfController annotationView:(UIView <PSPDFAnnotationViewProtocol> *)annotationView forAnnotation:(PSPDFAnnotation *)annotation onPageView:(PSPDFPageView *)pageView
1416-
//{
1417-
//
1418-
//}
1419-
1420-
//- (void)pdfViewController:(PSPDFViewController *)pdfController willShowAnnotationView:(UIView <PSPDFAnnotationViewProtocol> *)annotationView onPageView:(PSPDFPageView *)pageView
1421-
//{
1422-
//
1423-
//}
1424-
1425-
//- (void)pdfViewController:(PSPDFViewController *)pdfController didShowAnnotationView:(UIView <PSPDFAnnotationViewProtocol> *)annotationView onPageView:(PSPDFPageView *)pageView
1426-
//{
1427-
//
1428-
//}
1429-
1430-
//- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldShowController:(id)viewController embeddedInController:(id)controller animated:(BOOL)animated
1431-
//{
1432-
//
1433-
//}
1434-
1435-
//- (void)pdfViewController:(PSPDFViewController *)pdfController didShowController:(id)viewController embeddedInController:(id)controller animated:(BOOL)animated
1436-
//{
1437-
//
1438-
//}
1439-
1440-
//- (void)pdfViewController:(PSPDFViewController *)pdfController requestsUpdateForBarButtonItem:(UIBarButtonItem *)barButtonItem animated:(BOOL)animated
1441-
//{
1442-
//
1443-
//}
1444-
1445-
//- (void)pdfViewController:(PSPDFViewController *)pdfController didChangeViewMode:(PSPDFViewMode)viewMode
1446-
//{
1447-
//
1448-
//}
1449-
14501337
- (void)pdfViewControllerWillDismiss:(PSPDFViewController *)pdfController
14511338
{
14521339
[self sendEventWithJSON:@"{type:'willDismiss'}"];
@@ -1463,34 +1350,24 @@ - (void)pdfViewControllerDidDismiss:(PSPDFViewController *)pdfController
14631350
[self sendEventWithJSON:@"{type:'didDismiss'}"];
14641351
}
14651352

1466-
- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldShowHUD:(BOOL)animated
1467-
{
1468-
return [self sendEventWithJSON:@{@"type": @"shouldShowHUD", @"animated": @(animated)}];
1469-
}
1470-
1471-
- (void)pdfViewController:(PSPDFViewController *)pdfController willShowHUD:(BOOL)animated
1472-
{
1473-
[self sendEventWithJSON:@{@"type": @"willShowHUD", @"animated": @(animated)}];
1474-
}
1475-
1476-
- (void)pdfViewController:(PSPDFViewController *)pdfController didShowHUD:(BOOL)animated
1353+
- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldShowUserInterface:(BOOL)animated
14771354
{
1478-
[self sendEventWithJSON:@{@"type": @"didShowHUD", @"animated": @(animated)}];
1355+
return [self sendEventWithJSON:@{@"type": @"shouldShowUserInterface", @"animated": @(animated)}];
14791356
}
14801357

1481-
- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldHideHUD:(BOOL)animated
1358+
- (void)pdfViewController:(PSPDFViewController *)pdfController didShowUserInterface:(BOOL)animated
14821359
{
1483-
return [self sendEventWithJSON:@{@"type": @"shouldHideHUD", @"animated": @(animated)}];
1360+
[self sendEventWithJSON:@{@"type": @"didShowUserInterface", @"animated": @(animated)}];
14841361
}
14851362

1486-
- (void)pdfViewController:(PSPDFViewController *)pdfController willHideHUD:(BOOL)animated
1363+
- (BOOL)pdfViewController:(PSPDFViewController *)pdfController shouldHideUserInterface:(BOOL)animated
14871364
{
1488-
[self sendEventWithJSON:@{@"type": @"willHideHUD", @"animated": @(animated)}];
1365+
return [self sendEventWithJSON:@{@"type": @"shouldHideUserInterface", @"animated": @(animated)}];
14891366
}
14901367

1491-
- (void)pdfViewController:(PSPDFViewController *)pdfController didHideHUD:(BOOL)animated
1368+
- (void)pdfViewController:(PSPDFViewController *)pdfController didHideUserInterface:(BOOL)animated
14921369
{
1493-
[self sendEventWithJSON:@{@"type": @"didHideHUD", @"animated": @(animated)}];
1370+
[self sendEventWithJSON:@{@"type": @"didHideUserInterface", @"animated": @(animated)}];
14941371
}
14951372

14961373
#pragma mark Annotation toolbar delegate methods

0 commit comments

Comments
 (0)