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
340
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
800
Mobile Programming Protocol Extension
yuichirokato
0
82
Mobile Programming Protocol
yuichirokato
0
85
Mobile Programming enum
yuichirokato
0
160
Mobile Programming Optional
yuichirokato
0
130
Mobile Programming Struct
yuichirokato
0
130
Mobile Programming Initializer Beta
yuichirokato
0
120
Mobile Programming Inheritance
yuichirokato
0
150
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
12k
GoogleのAI Agent
shukob
0
200
2025advance01
minamizaki
0
140
Java で学ぶ 代数的データ型
ysknsid25
2
1.1k
ソフトウェアテストのAI活用_ver1.10
fumisuke
0
260
ゴリラ.vim #36 ~ Vim x SNS ~ スポンサーセッション
yasunori0418
1
440
データプレーンプログラミングとは? DPU&スイッチASICの開発経験から語る
ebiken
PRO
1
290
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
mnt_data_とは?ChatGPTコード実行環境を深堀りしてみた
icck
0
230
単一Gitリポジトリから独立しました
lycorptech_jp
PRO
0
330
Applied NLP in the Age of Generative AI: Future-Proof Strategies for Banking and Finance
inesmontani
PRO
0
180
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
25k
Featured
See All Featured
Site-Speed That Sticks
csswizardry
9
610
Gamification - CAS2011
davidbonilla
81
5.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
106
19k
GraphQLとの向き合い方2022年版
quramy
46
14k
Unsuck your backbone
ammeep
671
58k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
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
ޙଓ͘