From b53bf33639bf5d1e186b7bc9c6cd468fcb2220b7 Mon Sep 17 00:00:00 2001 From: DmitryH Date: Mon, 14 Oct 2019 21:54:08 +0300 Subject: [PATCH] iPad fix - Fixed demo application load image on iPad --- DocScanningSDK.framework/strip-DSSDK.sh | 4 ++++ Example-DocScanningSDK-iOS.xcodeproj/project.pbxproj | 4 ++-- PhotoSlider/Base.lproj/PhotoSliderViewController.xib | 1 + PhotoSlider/PhotoSliderViewController.h | 1 + PhotoSlider/PhotoSliderViewController.m | 3 +++ PhotoSlider/SettingsViewController.xib | 8 +++----- 6 files changed, 14 insertions(+), 7 deletions(-) create mode 100755 DocScanningSDK.framework/strip-DSSDK.sh diff --git a/DocScanningSDK.framework/strip-DSSDK.sh b/DocScanningSDK.framework/strip-DSSDK.sh new file mode 100755 index 0000000..820990f --- /dev/null +++ b/DocScanningSDK.framework/strip-DSSDK.sh @@ -0,0 +1,4 @@ +#! /bin/sh +mkdir -p $(dirname "$2") +lipo -remove i386 "$1" -o "$2" +lipo -remove x86_64 "$2" -o "$2" diff --git a/Example-DocScanningSDK-iOS.xcodeproj/project.pbxproj b/Example-DocScanningSDK-iOS.xcodeproj/project.pbxproj index b8bc946..c540d40 100644 --- a/Example-DocScanningSDK-iOS.xcodeproj/project.pbxproj +++ b/Example-DocScanningSDK-iOS.xcodeproj/project.pbxproj @@ -919,7 +919,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = 4XL92P45YN; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -961,7 +961,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = 4XL92P45YN; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( diff --git a/PhotoSlider/Base.lproj/PhotoSliderViewController.xib b/PhotoSlider/Base.lproj/PhotoSliderViewController.xib index 4daa5a9..5f3b14d 100644 --- a/PhotoSlider/Base.lproj/PhotoSliderViewController.xib +++ b/PhotoSlider/Base.lproj/PhotoSliderViewController.xib @@ -17,6 +17,7 @@ + diff --git a/PhotoSlider/PhotoSliderViewController.h b/PhotoSlider/PhotoSliderViewController.h index 76bc554..79fc73a 100644 --- a/PhotoSlider/PhotoSliderViewController.h +++ b/PhotoSlider/PhotoSliderViewController.h @@ -22,6 +22,7 @@ @property (nonatomic, weak) IBOutlet UIBarButtonItem *settingsButton; @property (nonatomic, weak) IBOutlet UIButton *rotateLeft; @property (nonatomic, weak) IBOutlet UIButton *rotateRight; +@property (nonatomic, weak) IBOutlet UIView *toolBar; @property (nonatomic, strong) PxMetaImage* inpImage; @property (nonatomic, strong) PxMetaImage* outImage; diff --git a/PhotoSlider/PhotoSliderViewController.m b/PhotoSlider/PhotoSliderViewController.m index 56d029a..17e2370 100644 --- a/PhotoSlider/PhotoSliderViewController.m +++ b/PhotoSlider/PhotoSliderViewController.m @@ -221,6 +221,9 @@ - (IBAction)loadAction:(id)sender preferredStyle:UIAlertControllerStyleActionSheet ]; + actionSheet.popoverPresentationController.barButtonItem = self.loadButton; +// actionSheet.popoverPresentationController.sourceView = self.toolBar; + [actionSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { @strongify(self) [self dismissViewControllerAnimated:YES completion:nil]; diff --git a/PhotoSlider/SettingsViewController.xib b/PhotoSlider/SettingsViewController.xib index c965e69..88d1e55 100644 --- a/PhotoSlider/SettingsViewController.xib +++ b/PhotoSlider/SettingsViewController.xib @@ -1,11 +1,9 @@ - - - - + + - +