From 3f01a95c73ef5281661992c8514e9fdca6eb55f1 Mon Sep 17 00:00:00 2001 From: VincentRoth Date: Thu, 30 Jun 2016 10:03:57 +0200 Subject: [PATCH] Update bounds to only use position coordinates --- src/ios/FileOpener2.m | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ios/FileOpener2.m b/src/ios/FileOpener2.m index 74cfacb..025769e 100644 --- a/src/ios/FileOpener2.m +++ b/src/ios/FileOpener2.m @@ -39,15 +39,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. uti = (__bridge NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)fileExt, NULL); } - CGRect bounds; + CGRect rect; if (3 >= [command.arguments count]) { - NSArray *boundsValues = [command.arguments objectAtIndex: 2]; - bounds = CGRectMake([[boundsValues objectAtIndex:0] floatValue], - [[boundsValues objectAtIndex:1] floatValue], - [[boundsValues objectAtIndex:2] floatValue], - [[boundsValues objectAtIndex:3] floatValue]); + NSArray *positionValues = command.arguments[2]; + rect = CGRectMake([0,0, + [[positionValues objectAtIndex:0] floatValue], + [[positionValues objectAtIndex:1] floatValue]); } else { - bounds = CGRectMake(0, 0, 1000.0f, 150.0f); + rect = CGRectMake(0, 0, 1000.0f, 150.0f); } CDVViewController* cont = (CDVViewController*)[ super viewController ]; @@ -74,7 +73,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. self.controller.UTI = uti; CDVPluginResult* pluginResult = nil; - BOOL wasOpened = [self.controller presentOptionsMenuFromRect:bounds inView:cont.view animated:NO]; + BOOL wasOpened = [self.controller presentOptionsMenuFromRect:rect inView:cont.view animated:NO]; if(wasOpened) { pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString: @""];