File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ - (dispatch_queue_t)methodQueue
1111
1212RCT_EXPORT_MODULE ();
1313
14- RCT_REMAP_METHOD (open, filePath:(NSString  *)filePath fileMine:(NSString  *)fileMine
14+ RCT_REMAP_METHOD (open, filePath:(NSString  *)filePath fileMine:(NSString  *)fileMine fromRect:(CGRectMake)rect 
1515                 resolver:(RCTPromiseResolveBlock)resolve
1616                 rejecter:(RCTPromiseRejectBlock)reject)
1717{
@@ -31,6 +31,11 @@ - (dispatch_queue_t)methodQueue
3131    UIViewController *ctrl = [[[[UIApplication sharedApplication ] delegate ] window ] rootViewController ];
3232
3333    BOOL  wasOpened = [self .FileOpener presentOpenInMenuFromRect: ctrl.view.bounds inView: ctrl.view animated: YES ];
34+         
35+     if  (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad)
36+     {
37+         wasOpened = [self .FileOpener presentOptionsMenuFromRect: rect inView: ctrl.view animated: YES ];
38+     }
3439
3540    if  (wasOpened) {
3641        resolve (@" Open success!!"  );
@@ -41,4 +46,4 @@ - (dispatch_queue_t)methodQueue
4146
4247}
4348
44- @end 
49+ @end 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments