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
330
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
780
Mobile Programming Protocol Extension
yuichirokato
0
78
Mobile Programming Protocol
yuichirokato
0
81
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
マルチデータプロダクト開発・運用に耐えるためのデータ組織・アーキテクチャの遷移
mtpooh
0
160
DevSecOps入門:Security Development Lifecycleによる開発プロセスのセキュリティ強化
yuriemori
0
240
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
10
120k
生成AIを活用した機能を、顧客に提供するまでに乗り越えた『4つの壁』
toshiblues
1
210
Grafanaのvariables機能について
tiina
0
180
例外処理を理解して、設計段階からエラーを「見つけやすく」「起こりにくく」する
kajitack
12
3.8k
Platform EngineeringがあればSREはいらない!? 新時代のSREに求められる役割とは
mshibuya
2
4k
ソフトウェアアーキテクトのための意思決定術: Software Architecture and Decision-Making
snoozer05
PRO
17
4k
Tech Blog執筆のモチベート向上作戦
imamura_ko_0314
0
740
インシデントキーメトリクスによるインシデント対応の改善 / Improving Incident Response using Incident Key Metrics
nari_ex
0
4.2k
プロダクト観点で考えるデータ基盤の育成戦略 / Growth Strategy of Data Analytics Platforms from a Product Perspective
yamamotoyuta
0
250
あなたはJVMの気持ちを理解できるか?
skrb
5
2k
Featured
See All Featured
RailsConf 2023
tenderlove
29
980
Producing Creativity
orderedlist
PRO
343
39k
Unsuck your backbone
ammeep
669
57k
Designing for Performance
lara
604
68k
Music & Morning Musume
bryan
46
6.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Cult of Friendly URLs
andyhume
78
6.2k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
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
ޙଓ͘