Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
20160928 時計仕掛けのアヒル
Search
Kei Ito
September 28, 2016
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20160928 時計仕掛けのアヒル
関モバ #18 の資料です
Kei Ito
September 28, 2016
More Decks by Kei Ito
See All by Kei Ito
20211015 Mac CatalystでmacOS用アプリを作る
itok
2
4.5k
20210219 Flutterに入門してみた
itok
1
4.1k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.5k
20191206 Property Wrappers 入門
itok
0
1.8k
20190920 iOS 13 対応ではまった話
itok
1
2.5k
20190726 Background App Refresh Taskがやってきた
itok
0
2.4k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.7k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.6k
20190412 Android TV向けアプリを作ってみる
itok
0
1.2k
Other Decks in Programming
See All in Programming
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
570
iOSDC2026登壇資料.pdf
riofujimon
0
200
スマート反転とウェブアクセシビリティ
camiha
0
220
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
510
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
220
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
280
Workers Cache を知る
syumai
0
310
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
360
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
190
Are APIs Still Relevant in the AI Era?
soyuka
0
360
JRuby: Past, Present, and Future
headius
0
210
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
Code Reviewing Like a Champion
maltzj
528
40k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Optimising Largest Contentful Paint
csswizardry
37
4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
The Curse of the Amulet
leimatthew05
3
15k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
560
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Transcript
࣌ܭֻ͚ͷΞώϧ ؔϞόΠϧΞϓϦݚڀձ !JUPL@UXJU
!JUPL@UXJU w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓ w ެࢲڞʹϓϩάϥϚJ04.BDʢͨ·ʹ"OESPJE8JOEPXTʣ w IUUQJUPLKQ IUUQTPSBLB[FDPKQ
None
4NBSU5VCW
XBUDI04ରԠʂ
None
Ξώϧͷಈ͔͠ํ w 4QSJUF,JU w $PSF.PUJPO w 8,(FTUVSF3FDPHOJ[FS
4QSJUF,JU
४උ let scene = SKScene(size: size) scene.physicsWorld.gravity = CGVector(dx: 0,
dy: 0) self.sceneInterface.presentScene(scene)
෩࿊Գ let bath = SKSpriteNode(imageNamed: "xxx") bath.physicsBody = SKPhysicsBody(edgeLoopFrom: path)
scene.addChild(bath)
Ξώϧ let duck = SKSpriteNode(texture: tex, size: size) duck.physicsBody =
SKPhysicsBody(texture: tex, alphaThreshold: 0.2, size: size) bath.addChild(duck)
$PSF.PUJPO
४උ motionMgr.startAccelerometerUpdates(to: OperationQueue()) { (data, error) in if let data
= data { let acceleration = data.acceleration . . . } }
γΣΠΫ if self.isShake(acceleration) { self.addDuck() }
͖ var sign = 1 if WKInterfaceDevice.current().crownOrientation == .left {
sign = -1 } physicsWorld.gravity = CGVector(dx: x * sign, dy: y * sign)
8,(FTUVSF3FDPHOJ[FS
͘͡ @IBAction func handlePan(_ sender: AnyObject) { let pan =
sender as! WKPanGestureRecognizer let velocity = pan.velocityInObject() duck.physicsBody?.velocity = CGVector(dx: velocity.x * r, dy: -velocity.y * r) }
·ͱΊ w ͚ͯΔͱ͙͢ʹը໘͕εϦʔϓ͢Δ w Ϋϥϯͷ͖ʹҙ w (FTUVSF3FDPHOJ[FS*#ͰͷΈଓͰ͖Δ w XBUDI୯ମͰޮՌԻ͕໐Βͤͳ͍