Slide 1

Slide 1 text

QPUBUPUJQT 6*$PMMFDUJPO7JFXΛศརʹ͔͚ΔϥΠϒϥϦΛ࡞Γ·ͨ͠

Slide 2

Slide 2 text

ࣗݾ঺հ *%CBOO[BJ ॴଐגࣜձࣾ"TPCJDB ৬ۀ&OHJOFFS ݺশελʔޤ৯ CBOO[BJ @CBOO[BJ@

Slide 3

Slide 3 text

$POWͱ͍͏ϥΠϒϥϦΛ࡞Γ·ͨ͠ (JU)VCϦϙδτϦ IUUQTHJUIVCDPNCBOO[BJ$POW 2JJUBʹ΋ಉ͡λΠτϧͰهࣄΛॻ͍ͨ IUUQTRJJUBDPNCBOO[BJJUFNTGECFDDBECF

Slide 4

Slide 4 text

Ͳ͏ศརͳͷʁ

Slide 5

Slide 5 text

ैདྷͷॻ͖ํ public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { switch section { case 0: return users.count case 1: return hobbies.count case 2: return teams.count default: fatalError() } } public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { switch (indexPath.section, indexPath.item) { case (0, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ACell", for: indexPath) as! UserCell cell.configure(with: users[indexPath.item]) ... return cell case (1, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "BCell", for: indexPath) as! HobbyCell cell.configure(with: hobbies[indexPath.item]) ... return cell case (2, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CCell", for: indexPath) as! TeamCell cell.configure(with: teams[indexPath.item]) ... return cell default: fatalError() } }

Slide 6

Slide 6 text

ैདྷͷॻ͖ํ public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { switch section { case 0: return users.count case 1: return hobbies.count case 2: return teams.count default: fatalError() } } public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { switch (indexPath.section, indexPath.item) { case (0, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ACell", for: indexPath) as! UserCell cell.configure(with: users[indexPath.item]) ... return cell case (1, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "BCell", for: indexPath) as! HobbyCell cell.configure(with: hobbies[indexPath.item]) ... return cell case (2, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CCell", for: indexPath) as! TeamCell cell.configure(with: teams[indexPath.item]) ... return cell default: fatalError() } } ύλʔϯϚον͠ͳ͍৔߹ͷGBUBM&SSPS

Slide 7

Slide 7 text

ैདྷͷॻ͖ํ public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { switch section { case 0: return users.count case 1: return hobbies.count case 2: return teams.count default: fatalError() } } public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { switch (indexPath.section, indexPath.item) { case (0, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ACell", for: indexPath) as! UserCell cell.configure(with: users[indexPath.item]) ... return cell case (1, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "BCell", for: indexPath) as! HobbyCell cell.configure(with: hobbies[indexPath.item]) ... return cell case (2, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CCell", for: indexPath) as! TeamCell cell.configure(with: teams[indexPath.item]) ... return cell default: fatalError() } } ࢄΒ͹Δ'PSDFVOXSBQ

Slide 8

Slide 8 text

ैདྷͷॻ͖ํ public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { switch section { case 0: return users.count case 1: return hobbies.count case 2: return teams.count default: fatalError() } } public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { switch (indexPath.section, indexPath.item) { case (0, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ACell", for: indexPath) as! UserCell cell.configure(with: users[indexPath.item]) ... return cell case (1, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "BCell", for: indexPath) as! HobbyCell cell.configure(with: hobbies[indexPath.item]) ... return cell case (2, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CCell", for: indexPath) as! TeamCell cell.configure(with: teams[indexPath.item]) ... return cell default: fatalError() } } ͲΕ͕ͲΕ

Slide 9

Slide 9 text

ैདྷͷॻ͖ํ public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { switch section { case 0: return users.count case 1: return hobbies.count case 2: return teams.count default: fatalError() } } public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { switch (indexPath.section, indexPath.item) { case (0, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ACell", for: indexPath) as! UserCell cell.configure(with: users[indexPath.item]) ... return cell case (1, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "BCell", for: indexPath) as! HobbyCell cell.configure(with: hobbies[indexPath.item]) ... return cell case (2, _): let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CCell", for: indexPath) as! TeamCell cell.configure(with: teams[indexPath.item]) ... return cell default: fatalError() } } ཁૉͷؔ܎ੑ͕ബ͍ɾԕ͍

Slide 10

Slide 10 text

$POWΛ࢖͏ͱ

Slide 11

Slide 11 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } }

Slide 12

Slide 12 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } ͜ΕͰ࡞Εͯ͠·͍·͢

Slide 13

Slide 13 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } ͚ͩ͜͜&OVNΛҰ͚ͭͩఆٛͨ͠

Slide 14

Slide 14 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } ഑ྻΛ౉ͨ͠਺͚ͩ4FDUJPO͕࡞ΒΕΔ

Slide 15

Slide 15 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } ഑ྻͷཁૉ͝ͱʹ4FDUJPOΛఆٛ͢ΔͷͰ *OEFY1BUIʹΞΫηε͠ͳ͍͍ͯ͘

Slide 16

Slide 16 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } 4FDUJPOʹ౉ͨ͠਺͚ͩ*UFN͕࡞ΒΕΔ

Slide 17

Slide 17 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } ഑ྻͷཁૉ͝ͱʹ*UFNΛఆٛ͢ΔͷͰ *OEFY1BUIʹΞΫηε͠ͳ͍͍ͯ͘

Slide 18

Slide 18 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } $FMM͝ͱͷ%BUB4PVSDFɾ%FMFHBUFͷϝιουͷϥούʔୡ

Slide 19

Slide 19 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } (FOFSJDTͰΩϟετ͞Εͨ$FMM͕౉ͬͯ͘Δ

Slide 20

Slide 20 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } 4FDUJPOͱ*UFNͷؔ܎ੑ͕໌֬ʹɻݶఆతʹ

Slide 21

Slide 21 text

collectionView .conv() .create(for: SectionType.allCases) { (sectionType, section) in // ※2 switch sectionType { case .users: section.create(for: users) { user, item: Item in item.reusableIdentifier = "ACell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: user) }) } case .hobbies: section.create(for: hobbies) { hobby, item: Item in item.reusableIdentifier = "BCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: hobby) }) } case .teams: section.create(for: teams) { team, item: Item in item.reusableIdentifier = "CCell" item.size = ... item.configureCell({ cell, _ in cell.configure(with: team) }) } } } ແବͳGBUBM&SSPS͕ͳ͘ͳ͍ͬͯΔ

Slide 22

Slide 22 text

͍͍͡ΌΜ

Slide 23

Slide 23 text

͍͍͘͢͝

Slide 24

Slide 24 text

࠷ߴ

Slide 25

Slide 25 text

͓·͚ $POWͰ͸ࠩ෼ߋ৽ͷΞϧΰϦζϜͱͯ͠ 1BVM)FDLFMTBMHPSJUINΛϕʔεͱͯ͠࡞͍ͬͯ ·͢ɻͳͷͰඞཁͳ෦෼͚ͩߋ৽͢ΔͷͰແବͳॲཧ ͕ͳ͍ *(-JTU,JU͕ಉ͡ΞϧΰϦζϜ࢖͍ͬͯΔ IUUQTHJUIVCDPN*OTUBHSBN*(-JTU,JU

Slide 26

Slide 26 text

͓ΘΓʹ (JU)VCϦϙδτϦ IUUQTHJUIVCDPNCBOO[BJ$POW 2JJUBʹ΋ಉ͡λΠτϧͰهࣄΛॻ͍ͨ IUUQTRJJUBDPNCBOO[BJJUFNTGECFDDBECF

Slide 27

Slide 27 text

͓͠·͍a ?P?