summaryrefslogtreecommitdiff
path: root/src/ios.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/ios.m')
-rw-r--r--src/ios.m14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ios.m b/src/ios.m
index 69e09419..82596ffd 100644
--- a/src/ios.m
+++ b/src/ios.m
@@ -25,6 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
25#include "audio/player.h" 25#include "audio/player.h"
26#include "ui/command.h" 26#include "ui/command.h"
27#include "ui/window.h" 27#include "ui/window.h"
28#include "ui/touch.h"
28 29
29#include <the_Foundation/file.h> 30#include <the_Foundation/file.h>
30#include <the_Foundation/fileinfo.h> 31#include <the_Foundation/fileinfo.h>
@@ -541,7 +542,18 @@ static void openActivityView_(NSArray *activityItems) {
541 [[UIActivityViewController alloc] 542 [[UIActivityViewController alloc]
542 initWithActivityItems:activityItems 543 initWithActivityItems:activityItems
543 applicationActivities:nil]; 544 applicationActivities:nil];
544 [viewController_(get_Window()) presentViewController:actView animated:YES completion:nil]; 545 iWindow *win = get_Window();
546 UIViewController *viewCtl = viewController_(win);
547 UIPopoverPresentationController *popover = [actView popoverPresentationController];
548 if (popover) {
549 [popover setSourceView:[viewCtl view]];
550 iInt2 tapPos = latestTapPosition_Touch();
551 tapPos.x /= win->pixelRatio;
552 tapPos.y /= win->pixelRatio;
553 [popover setSourceRect:(CGRect){{tapPos.x - 10, tapPos.y - 10}, {20, 20}}];
554 [popover setCanOverlapSourceViewRect:YES];
555 }
556 [viewCtl presentViewController:actView animated:YES completion:nil];
545} 557}
546 558
547void openTextActivityView_iOS(const iString *text) { 559void openTextActivityView_iOS(const iString *text) {