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
Mobile Programming Inheritance
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yuichiro_takahashi
November 26, 2018
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mobile Programming Inheritance
モバイルプログラミングの授業で使うスライドです
yuichiro_takahashi
November 26, 2018
More Decks by yuichiro_takahashi
See All by yuichiro_takahashi
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
700
App Clip - in a nutshell
yuichirokato
0
400
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
860
Mobile Programming Protocol Extension
yuichirokato
0
100
Mobile Programming Protocol
yuichirokato
0
110
Mobile Programming enum
yuichirokato
0
200
Mobile Programming Optional
yuichirokato
0
160
Mobile Programming Struct
yuichirokato
0
150
Mobile Programming Initializer Beta
yuichirokato
0
160
Other Decks in Technology
See All in Technology
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
110
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
370
購入ドメインでの課題と取り組み
ykagano
0
150
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
0
1k
プロダクト価値を、 チームが使える判断軸に変える
vivion
0
140
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
530
AI時代のAPI開発を加速する品質ガードレール / API Quality Guardrails in the AI Era
yokawasa
0
170
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.1k
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
240
go-sqletch
moznion
0
120
自分で立ててみるLLMサービス
y_sera15
0
150
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
150
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
620
The agentic SEO stack - context over prompts
schlessera
0
970
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
980
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Claude Code のすすめ
schroneko
67
230k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Facilitating Awesome Meetings
lara
57
7.2k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
Transcript
ܧঝ MOBILE PROGRAMMING 26TH NOV
1. ܧঝʹ͍ͭ ͯ
ςΩετ ܧঝͬͯʁ ▸ Ϋϥε͕࣋ͭػೳͷҰͭ ▸ ͕࣋ͭϓϩύςΟϝιουΛड͚ܧ͙ ▸ ܧঝݩͷΫϥεΛΫϥε(super class) ▸
ܧঝઌͷΫϥεΛࢠΫϥε(sub class)ͱ͍͏ ▸ จ๏ class SubClass: Super Class { ... } ▸ swift Ͱ͏ॴݶΒΕΔ ▸ جຊతʹϙϦϞʔϑΟζϜ(ଟଶੑ)ͷͨΊʹΘΕΔ
ςΩετ ࣮ࡍͷίʔυ class Pokemon { let name: String var ability:
String var level: Int = 0 init(name: String, level: Int, ability: String = "͍ͨ͋ͨΓ") { self.name = name self.level = level self.ability = ability } func displayStatus() { print("\(self.name)ͷϨϕϧ\(self.level)Ͱ͢ɻ") } func doAbility(to pokemon: Pokemon) { print("\(self.name)\(pokemon.name)ʹ\(self.ability)ͨ͠ʂ") } } class Metagross: Pokemon { init(level: Int) { super.init(name: "ϝλάϩε", level: level, ability: "ίϝοτύϯν") } }
2. Ϋϥεͱ ࢠΫϥε
ςΩετ ΫϥεͱࢠΫϥε ▸ جຊతʹࢠΫϥε͔ΒΫϥεͷϓϩύςΟϝιουશͯΞΫ ηεՄೳ ▸ ͦͷࡍself ͷΘΓʹsuperΛ͏ ▸ ࢠΫϥεͰΫϥεͷϝιουΛॻ͖͑Δ͜ͱ͕Ͱ͖Δ
▸ ͜ΕΛϝιουͷΦʔόʔϥΠυͱݴ͏ ▸ ࢠΫϥεʹ৽͘͠ϝιουϓϩύςΟΛఆٛ͢Δ͜ͱ͕Ͱ͖Δ ▸ ࢠΫϥεΫϥεͷܕҾ͖ܧ͙
ςΩετ ࣮ࡍͷίʔυ class Pokemon { let name: String // pokemon's
name (ex pikachu) fileprivate(set) var level: Int // pokemon's level fileprivate(set) var health: Int = 1 // pokemon's hit point init(name: String, level: Int) { self.name = name self.level = level self.health = level * 2 } func displayStatus() { print("Name: \(self.name)") print("Lv: \(self.level)") print("HP: \(self.health)") } func doAbility() { print("\(self.name)ͷ͍ͨ͋ͨΓʂ") } } class Slowpoke: Pokemon { init(level: Int) { // ΫϥεͷϝιουΛݺͼग़͢ super.init(name: "Ϡυϯ", level: level) } // Ϋϥεʹఆٛ͞Ε͍ͯΔϝιουΛॻ͖͑Δ override func doAbility() { print("\(self.name)ͷͶΜΓ͖ʂ") } } let slowpoke: Pokemon = Slowpoke(level: 10) slowpoke.displayStatus() slowpoke.doAbility() // ϠυϯͷͶΜΓ͖ʂͱදࣔ͞ΕΔ(͍ͨ͋ͨΓͰͳ͍)