First step of 3D touch

F9feb45c0a049cccc3e2563f1fe2f869?s=47 sonson
November 08, 2016

First step of 3D touch

F9feb45c0a049cccc3e2563f1fe2f869?s=128

sonson

November 08, 2016
Tweet

Transcript

  1. How to show it. Tech. Yuichi Yoshida Researcher, DENSO IT

    Laboratory, Inc. #???? @sonson_twit © 2014 DENSO IT Laboratory, Inc., All rights reserved. Redistribution or public display not permitted without written permission from DENSO IT Laboratory, Inc. First step of 3D touch
  2. ࣗݾ঺հ • sonson • twitter: sonson_twit • github: sonsongithub •

    portfolio • reddift(SwiftͰॻ͍ͨreddit.comͷAPIϥούʔ) • ࢓ࣄ • ը૾ೝࣝ/ݕࡧ/ͦΕΛ࢖ͬͨΞϓϦ • ػցֶशͷ͓ษڧͱ͔ॾʑͱ͔
  3. ͜ͷϘέͳ͍ྖҬͷઃఆʙμϝͳྫ

  4. ͜ͷϘέͳ͍ྖҬͷઃఆʙOK

  5. ͜ͷϘέͳ͍ྖҬͷઃఆʙҰ൪͍͍

  6. දࣔͷྲྀΕ • registerForPreviewingͰ४උ͢Δ • ͜͜Ͱ3D touchʹ൓Ԡ͢ΔviewΛઃఆ͢Δ • previewingContext(_:viewControllerForLocation:) • sourceRectΛઃఆ͢Δ

    • ্Ͱઃఆͨ͠viewͷ࠲ඪܥͰsourceRectΛηοτ
  7. registerForPreviewing

  8. previewingContext(_:viewControllerForLocation:) • Body

  9. previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX

  10. previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX %UPVDIൃੜ

  11. previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX ͳΜ͔ίϯςϯπ͋Δʁ ίϯςϯπ

  12. previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX 6*7JFX$POUSPMMFS ͜ͷྖҬ͔Β ͜ͷ7JFX$POUSPMMFSΛදࣔͯ͠ ίϯςϯπ

  13. previewingContext(_:viewControllerForLocation:) • Body

  14. previewingContext(_:viewControllerForLocation:) • Body

  15. previewingContext(_:viewControllerForLocation:)

  16. UIView.convert • ͋Δview͔Βݟͨɼ͋ΔviewͷrectΛܭࢉͯ͘͠ΕΔ • a.convert(rect:, to:b) • view a಺ͷrectΛview b͔Βݟͨrectʹม׵

    • a.convert(rect:, from:b) • view b಺ͷrectΛview a͔Βݟͨrectʹม׵ • ఺΋͋Γ·͢ • a.convert(point: to:b) • a.convert(point: from:b)
  17. UIView.convert f=(200,50,50,60) b a c

  18. UIView.convert f=(200,50,50,60) b a a.convert(f, from:c) => (800,80,50,60) c

  19. UIView.convert f=(200,50,50,60) b a c.convert(f, to:a) => (800,80,50,60) c

  20. Ԡ༻͢Δͱ

  21. previewingContext(_:viewControllerForLocation:) • Body

  22. αϯϓϧ • UZTextView • https://github.com/sonsongithub/UZTextView • developϒϥϯν

  23. 3D Touchͷςετ͸ • ࣮ػ • Simulator

  24. ·ͱΊ • registerForPreviewingͰ४උ • viewΛొ࿥ • previewingContext(_:viewControllerForLocation:) • view controllerΛ࡞੒

    • Ξχϝʔγϣϯ͍ͤͨ͞ྖҬΛܭࢉ • ฦ͢
  25. None