Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
First step of 3D touch
Search
sonson
November 08, 2016
Programming
0
570
First step of 3D touch
sonson
November 08, 2016
Tweet
Share
More Decks by sonson
See All by sonson
計算グラフのJITコンパイラをLLVM on C++で作ろう
sonsongithub
2
530
LLVMでHalideみたいな計算グラフ+JITを作りたい
sonsongithub
0
1.3k
LLVM Tutorial 02 - わいわいswiftc
sonsongithub
1
370
LLVM Tutorial - わいわいswiftc
sonsongithub
0
280
How to make and publish a Swift playground book for iPad
sonsongithub
5
19k
Swiftで実装するHTML特殊文字の高速処理
sonsongithub
3
7.6k
Getting started with 3D Touch
sonsongithub
0
650
SSLって必要ですか〜Let's Encryptを試してみよう
sonsongithub
3
520
Other Decks in Programming
See All in Programming
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.6k
Identifying User Idenity
moro
6
7.7k
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
3.1k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
190
CSC305 Lecture 13
javiergs
PRO
0
130
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
160
hotwire_or_react
harunatsujita
8
4k
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
490
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.6k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
7
430
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
How STYLIGHT went responsive
nonsquared
95
5.2k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Building Adaptive Systems
keathley
38
2.2k
Code Reviewing Like a Champion
maltzj
519
39k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
What's in a price? How to price your products and services
michaelherold
243
12k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Agile that works and the tools we love
rasmusluckow
327
21k
Automating Front-end Workflow
addyosmani
1365
200k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Transcript
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
ࣗݾհ • sonson • twitter: sonson_twit • github: sonsongithub •
portfolio • reddift(SwiftͰॻ͍ͨreddit.comͷAPIϥούʔ) • ࣄ • ը૾ೝࣝ/ݕࡧ/ͦΕΛͬͨΞϓϦ • ػցֶशͷ͓ษڧͱ͔ॾʑͱ͔
͜ͷϘέͳ͍ྖҬͷઃఆʙμϝͳྫ
͜ͷϘέͳ͍ྖҬͷઃఆʙOK
͜ͷϘέͳ͍ྖҬͷઃఆʙҰ൪͍͍
දࣔͷྲྀΕ • registerForPreviewingͰ४උ͢Δ • ͜͜Ͱ3D touchʹԠ͢ΔviewΛઃఆ͢Δ • previewingContext(_:viewControllerForLocation:) • sourceRectΛઃఆ͢Δ
• ্Ͱઃఆͨ͠viewͷ࠲ඪܥͰsourceRectΛηοτ
registerForPreviewing
previewingContext(_:viewControllerForLocation:) • Body
previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX
previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX %UPVDIൃੜ
previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX ͳΜ͔ίϯςϯπ͋Δʁ ίϯςϯπ
previewingContext(_:viewControllerForLocation:) 6*7JFX$POUSPMMFS1SFWJFXJOH%FMFHBUF 6*7JFX$POUSPMMFS 7JFX 6*7JFX$POUSPMMFS ͜ͷྖҬ͔Β ͜ͷ7JFX$POUSPMMFSΛදࣔͯ͠ ίϯςϯπ
previewingContext(_:viewControllerForLocation:) • Body
previewingContext(_:viewControllerForLocation:) • Body
previewingContext(_:viewControllerForLocation:)
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)
UIView.convert f=(200,50,50,60) b a c
UIView.convert f=(200,50,50,60) b a a.convert(f, from:c) => (800,80,50,60) c
UIView.convert f=(200,50,50,60) b a c.convert(f, to:a) => (800,80,50,60) c
Ԡ༻͢Δͱ
previewingContext(_:viewControllerForLocation:) • Body
αϯϓϧ • UZTextView • https://github.com/sonsongithub/UZTextView • developϒϥϯν
3D Touchͷςετ • ࣮ػ • Simulator
·ͱΊ • registerForPreviewingͰ४උ • viewΛొ • previewingContext(_:viewControllerForLocation:) • view controllerΛ࡞
• Ξχϝʔγϣϯ͍ͤͨ͞ྖҬΛܭࢉ • ฦ͢
None