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
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
680
App Clip - in a nutshell
yuichirokato
0
390
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
860
Mobile Programming Protocol Extension
yuichirokato
0
99
Mobile Programming Protocol
yuichirokato
0
110
Mobile Programming enum
yuichirokato
0
190
Mobile Programming Optional
yuichirokato
0
150
Mobile Programming Struct
yuichirokato
0
140
Mobile Programming Initializer Beta
yuichirokato
0
150
Other Decks in Technology
See All in Technology
omasushiというライブラリを作った
polidog
PRO
0
190
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
460
Screen Lens - 今見てる画面を翻訳する
komagata
0
240
20260912_スクフェス三河
kgnkhkr
0
270
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
1
260
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
680
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
480
AI-DLCって実際どう? 〜聞きたいこと全部聞いてみる〜
news_it_enj
0
260
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
25k
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
600
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
210
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
500
Featured
See All Featured
Designing for Performance
lara
611
70k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
340
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
202
76k
Embracing the Ebb and Flow
colly
88
5.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
310
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
620
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
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() // ϠυϯͷͶΜΓ͖ʂͱදࣔ͞ΕΔ(͍ͨ͋ͨΓͰͳ͍)