Skip to content

Commit 948669c

Browse files
authored
Merge pull request #1 from DaniAkash/patch-1
add "open with" dialogue box in ipad.
2 parents 43bd130 + 87edc8a commit 948669c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/RNFileOpener/RNFileOpener.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ - (dispatch_queue_t)methodQueue
1111

1212
RCT_EXPORT_MODULE();
1313

14-
RCT_REMAP_METHOD(open, filePath:(NSString *)filePath fileMine:(NSString *)fileMine fromRect:(CGRectMake)rect
14+
RCT_REMAP_METHOD(open, filePath:(NSString *)filePath fileMine:(NSString *)fileMine
1515
resolver:(RCTPromiseResolveBlock)resolve
1616
rejecter:(RCTPromiseRejectBlock)reject)
1717
{
@@ -34,7 +34,7 @@ - (dispatch_queue_t)methodQueue
3434

3535
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
3636
{
37-
wasOpened = [self.FileOpener presentOptionsMenuFromRect:rect inView:ctrl.view animated:YES];
37+
wasOpened = [self.FileOpener presentOptionsMenuFromRect:CGRectMake(CGRectGetMidX(ctrl.view.frame), CGRectGetMidY(ctrl.view.frame), 0, 20) inView:ctrl.view animated:YES];
3838
}
3939

4040
if (wasOpened) {

0 commit comments

Comments
 (0)