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
MobileProgramming Class
Search
yuichiro_takahashi
October 31, 2018
Technology
0
140
MobileProgramming Class
Mobile Programmingの授業で使うスライドです
yuichiro_takahashi
October 31, 2018
Tweet
Share
More Decks by yuichiro_takahashi
See All by yuichiro_takahashi
App Clip - in a nutshell
yuichirokato
0
310
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
770
Mobile Programming Protocol Extension
yuichirokato
0
78
Mobile Programming Protocol
yuichirokato
0
79
Mobile Programming enum
yuichirokato
0
160
Mobile Programming Optional
yuichirokato
0
130
Mobile Programming Struct
yuichirokato
0
120
Mobile Programming Initializer Beta
yuichirokato
0
120
Mobile Programming Inheritance
yuichirokato
0
140
Other Decks in Technology
See All in Technology
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
780
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
.NET 9 のパフォーマンス改善
nenonaninu
0
1.6k
20241220_S3 tablesの使い方を検証してみた
handy
4
760
大規模言語モデルとそのソフトウェア開発に向けた応用 (2024年版)
kazato
1
130
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
140
サーバーなしでWordPress運用、できますよ。
sogaoh
PRO
0
140
C++26 エラー性動作
faithandbrave
2
840
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
28
24k
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
140
プロダクト組織で取り組むアドベントカレンダー/Advent Calendar in Product Teams
mixplace
0
430
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
200
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
The Cult of Friendly URLs
andyhume
78
6.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Embracing the Ebb and Flow
colly
84
4.5k
Bash Introduction
62gerente
609
210k
Building an army of robots
kneath
302
44k
Speed Design
sergeychernyshev
25
680
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Transcript
CLASS MOBILE PROGRAMMING 31ST OCT
1. CLASSͱ
ςΩετ CLASS ▸ Objectࢦݴޠʹ͓͍ͯϓϩάϥϜΛܗͮ͘ΔҰͭͷ·ͱ ·Γ ▸ Class͝ͱʹׂ(ػೳ)ΛܾΊͯ࠶ར༻͍͢͠ܗʹ͢Δ͜ ͱͰϓϩάϥϜΛ࡞ɺӡ༻͘͢͢͠Δ ▸ ϓϩάϥϜதͰ·ͣClassΛఆٛ͠ɺClassΛ͍͍ͨՕॴ
ͰΠϯελϯεԽ͢Δͱ͍͏ྲྀΕʹͳΔ ▸ ClassΛΠϯελϯεԽͨ͠ͷΛΦϒδΣΫτͱݺͿ
1-1. CLASSͷఆٛ
ςΩετ CLASSͷఆٛ ▸ ·͍͍ͣͨClassΛఆٛ͢Δඞཁ͕͋Δ ▸ ۩ମతʹ ▸ ClassͲΜͳ໊લ͔ ▸ ClassʹͲΜͳσʔλ͕͋Δ͔(property)
▸ Class͕ͲΜͳػೳΛ͍࣋ͬͯΔ͔(method) ▸ Λఆ͍ٛͯ͘͠
ςΩετ CLASSͷఆٛ ▸ Swiftʹ͓͚ΔClassͷจ๏ҎԼͷ௨Γ class <ClassName>: <SuperClass> { let property1:
String var property2: String func method() { … } }
ςΩετ CLASSͷఆٛ ▸ ࣮ࡍͷίʔυ class Dog: Animal { let name:
String let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } } Classͷ͍࣋ͬͯΔσʔλ(Property) ͜͜ͰॳظԽ͢Δ(constructor, initializer) Classͷ͍࣋ͬͯΔػೳ(Method)
1-2. CLASSͷ༻
ςΩετ CLASSͷఆٛ ▸ ఆٛ͞ΕͨClassͦͷ··Ͱҙຯ͕͋Γ·ͤΜ ▸ ఆٛ͞ΕͨClassΛ͍͍ͨॴͰ ▸ ΠϯελϯεԽ͠(ClassͷΦϒδΣΫτΛ࡞͢Δ) ▸ ClassͷػೳΛ͏
▸ ͜ͱͰClassʹॻ͔Εͨίʔυ͕࣮ߦ͞Ε·͢
ςΩετ CLASSͷఆٛ ▸ Swiftʹ͓͚ΔClassͷΠϯελϯεԽɺ༻ͷํ๏ҎԼͷ௨Γ let dog = <ClassName>() dog.property1 dog.method(hoge:
“hoge”)
ςΩετ CLASSͷఆٛ ▸ ࣮ࡍͷίʔυ let dog = Dog(name: "pochi", kind:
"Doberman") dog.name dog.selfIntroduction() ClassͷΠϯελϯεԽ Classͷσʔλ(Property)ʹΞΫηε ClassͷػೳΛ͏(ϝιουݺͼग़͠)
2. CLASSͷཁૉ
ςΩετ 2. CLASSͷཁૉ ▸ Classͷதʹ༷ʑͳཁૉ͕ଘࡏ͠·͢ class Dog: Animal { let
name: String private let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } }
ςΩετ 2. CLASSͷཁૉ ▸ Classͷதʹ༷ʑͳཁૉ͕ଘࡏ͠·͢ class Dog: Animal { let
name: String private let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } } Property
ςΩετ 2. CLASSͷཁૉ ▸ Classͷதʹ༷ʑͳཁૉ͕ଘࡏ͠·͢ class Dog: Animal { let
name: String private let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } } Property Method
ςΩετ 2. CLASSͷཁૉ ▸ Classͷதʹ༷ʑͳཁૉ͕ଘࡏ͠·͢ class Dog: Animal { let
name: String private let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } } Property initializer(constructor) Method
ςΩετ 2. CLASSͷཁૉ ▸ Classͷதʹ༷ʑͳཁૉ͕ଘࡏ͠·͢ class Dog: Animal { let
name: String private let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } } Property ΞΫηεम০ࢠ initializer(constructor) Method
ςΩετ 2. CLASSͷཁૉ ▸ Classͷதʹ༷ʑͳཁૉ͕ଘࡏ͠·͢ class Dog: Animal { let
name: String private let kind: String init(name: String, kind: String) { self.name = name self.kind = kind } func selfIntroduction() { print("My name is \(name)") print("I'm \(kind)") print("nice to meet you sir.") } } ܧঝ Property ΞΫηεम০ࢠ initializer(constructor) Method
ޙଓ͘