1

I found a app WPS, which can share file with Split View betweed WPS and QQ. Video

https://github.com/bottotl/photos/blob/master/wps_qq.jpg?raw=true

It is amazing. How can I do the same thing?

jft0m
  • 193
  • 1
  • 7

2 Answers2

0

It is done by 'Multi-Tasking' feature provided by iOS itself.

If you want to do the same, just like this, You may look at this tutorials.

iOS 9: An Introduction to Multitasking on iPad & iOS 9 Multitasking Tutorial

Nirmit Dagly
  • 1,272
  • 1
  • 12
  • 25
  • It seams still no solution to **share files** between two apps.In this two apps,user can **drag one file to another** like the same way in Mac.It seams not 'share extension'. – jft0m Aug 18 '16 at 02:43
0

That's really cool. Just a high-level thought about how this might be approached:

1) When the drag starts in the WPS app, copy the image and its position to the general UIPasteboard. For the position, examine the window bounds to determine if the WPS app is running in split screen and if so, in which split (left, right, portrait, landscape, etc). Based on this, save the position of the dragged image relative to the entire iPad screen.

2) Also when the drag starts, call a custom URL scheme defined by the QQ app that will open the QQ app and tell it to monitor the general pasteboard. Since the QQ app is already open in the other split, nothing visible happens to the user, but the QQ app still gets notified of the call to its custom URL scheme, recreates the image from the pasteboard data and calculates the position it should be in relative to its own split area based on the absolute positioning saved to the pasteboard.

3) Now, as the dragging continues, whichever app is receiving the touch will update the pasteboard with the location of the touch relative to the whole iPad screen. Whichever app is not receiving the touch will read from the pasteboard every frame and update its copy of the image with the latest position.

4) Whichever app the drag ends in will call back to the other app using a custom URL scheme to notify that the drag operation ended and to stop monitoring the pasteboard.

This s just a theoretical approach that I haven't tried to implement, but I don't see any reason why it couldn't work.

Daniel Hall
  • 13,457
  • 4
  • 41
  • 37