Upgrade to Pro — share decks privately, control downloads, hide ads and more …

InterApp DnD in iOS 9

53e469a19bcb4584c87789d237128ca0?s=47 matuyuji
September 30, 2015

InterApp DnD in iOS 9

iOS 9 の split view でアプリ間でのドラッグ&ドロップのデモアプリの紹介と実装についての解説

53e469a19bcb4584c87789d237128ca0?s=128

matuyuji

September 30, 2015
Tweet

Transcript

  1. %O%JOJ04 ŠUIF&SBPG.VMUJUBTLJOH !NBUVZVKJ ؔ੢ϞόΠϧΞϓϦݚڀձ 

  2. !NBUVZVKJ TBGYEFWCMPHTQPUKQ

  3. TBGYJPTEOEEFNP

  4. .VMUJUBTLJOH 4MJEFPWFS 4QMJUWJFX 1JDUVSFJOQJDUVSF

  5. Two foreground apps

  6. 4QMJUWJFXBMMPXTVTFSTUP JOUFSBDUCFUXFFOUXPBQQT

  7. %O%CFUXFFO UXPBQQT

  8. UPVDIFT.PWFE (-100, 400) (607, 400) (-507, 0) (507, 0) %SBHFWFOUTDPOUJOVFPOUIFPVUFSPGUIFXJOEPXPGBQQ

  9. *OUFSBQQ%O% 4PVSDF"QQ %FTU"QQ touchesBegan touchesMoved touchesEnded 4IBQFJOGP $PPSEJOGP *OOFSPSPVUFS

  10. *1$ w 1BTUFCPBSE w $'.FTTBHF1PSU X"QQ(SPVQT*%  w .BDI1PSU mach_msg_send

     w %BSXJO/PUJpDBUJPO w 4IBSFE6TFS%FGBVMUT X"QQ(SPVQT*%
  11. 1BTUFCPBSE 5JNFS UPPMBUFUPSFDFJWF6*1BTUFCPBSE$IBOHFE/PUJpDBUJPO let p = touches.first!.locationInView(view) myPasteboard.string = "M,\(Int(p.x)),\(Int(p.y))"

    dispatch_source_set_timer(timer, now, USEC_PER_SEC * 50, 0) dispatch_source_set_event_handler(timer) { () -> Void in if let pb = UIPasteboard(name: otherID, create: false) { : } } dispatch_resume(timer) 4PVSDF"QQ VTFTOBNFEQBTUFCPBSE %FTU"QQ LOPXTTPVSDFBQQ`TQBTUFCPBSEOBNF
  12. 3FGFSFODFT w "EPQUJOH.VMUJUBTLJOH&OIBODFNFOUTPOJ1BE
 IUUQTEFWFMPQFSBQQMFDPNMJCSBSZQSFSFMFBTFJPTEPDVNFOUBUJPO8JOEPXT7JFXT$PODFQUVBM "EPQUJOH.VMUJUBTLJOH0OJ1BEJOEFYIUNM  w *OUFSQSPDFTTDPNNVOJDBUJPOPOJ04XJUI.BDINFTTBHFT
 IUUQEEFWJMMFNFJOUFSQSPDFTTDPNNVOJDBUJPOPOJPTXJUINBDINFTTBHFT w

    *OUFS1SPDFTT$PNNVOJDBUJPO
 IUUQOTIJQTUFSDPNJOUFSQSPDFTTDPNNVOJDBUJPO