Slide 1

Slide 1 text

ೖྗΛܕͰදݱ͢Δ !NPUPLJFF QPUBUPUJQT

Slide 2

Slide 2 text

ࣗݾ঺հ w HJUIVC UXJUUFS!NPUPLJFF w ϝϧΧϦι΢κ΢J04ΤϯδχΞ w ϝϧΧϦΧ΢ϧνʔϜ w J04%$+BQBOελοϑ

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

ʙອըηοτͷग़඼ɾߪೖʹରԠ

Slide 5

Slide 5 text

ग़඼ํ๏ όʔίʔυΛಡΈࠐΉ
 ˠ&"/ίʔυ͔Β"1*ܦ༝Ͱ੡඼৘ใΛऔಘ λΠτϧ͔Βݕࡧ͢Δ
 ˠςΩετ͔Β੡඼৘ใΛऔಘʢ6*্ɺ੡඼σʔλ͸औಘࡁʣ

Slide 6

Slide 6 text

%FNP

Slide 7

Slide 7 text

ग़඼ը໘͸ͦͦ͜͜ෳࡶ w ܦ࿏͕ෳ਺ʢ͍·͸͚ͭͩͲʜʣ w όʔίʔυಡΈࠐΈ w λΠτϧݕࡧ w ϓϨʔεϗϧμͷදࣔ w ్தͰ੡඼ͷ৘ใ͕੾ΓସΘΔʢອըηοτʣ

Slide 8

Slide 8 text

ෳ਺ͷೖྗΛͭͷܕͰදݱ

Slide 9

Slide 9 text

struct ProactiveExhibit { enum Input: Equatable { case ean(String) case exhibit(BulkIncludeExhibit) } let input: Input } ೖྗͷந৅Խ

Slide 10

Slide 10 text

struct ProactiveExhibit { enum Input: Equatable { case ean(String) case exhibit(BulkIncludeExhibit) } let input: Input } Χϝϥ͔ΒऔಘͰ͖Δ&"/ίʔυ
 ʢ੡඼৘ใऔಘΛ"1*ܦ༝Ͱऔಘʣ

Slide 11

Slide 11 text

struct ProactiveExhibit { enum Input: Equatable { case ean(String) case exhibit(BulkIncludeExhibit) } let input: Input } λΠτϧݕࡧը໘͔Β౉͞ΕΔ੡඼৘ใ
 ʢݕࡧࡁΈͷ੡඼৘ใ͕ͦͷ··౉͞ΕΔʣ

Slide 12

Slide 12 text

let input = Observable .of(scanCamera.barcodeNumber.map { ProactiveExhibit.Input.ean($0) }, exhibitAdapter.map { ProactiveExhibit.Input.exhibit(BulkIncludeExhibit(exhibits: [$0])) } ) .merge() .asDriver(onErrorDriveWith: .empty()) let removeExhibitsInput = Observable .merge(GlobalObservable.removeExhibitsForExhibitCamera, removeExhibitAdapter) .asDriver(onErrorDriveWith: .empty()) let replaceExhibitInput = replaceExhibitAdapter.asDriver(onErrorDriveWith: .empty()) viewModel = ExhibitCameraViewModel(input: input, removeExhibitsInput: removeExhibitsInput, replaceExhibitInput: replaceExhibitInput) Χϝϥ͔Β౉ͬͯ͘Δ&"/ίʔυͷετϦʔϜͱɺ
 λΠτϧը໘͔Β౉͞ΕΔ੡඼σʔλͷετϦʔϜΛNFSHF
 ˠ%SJWFS1SPBDUJWF&YIJCJU*OQVU

Slide 13

Slide 13 text

let input = Observable .of(scanCamera.barcodeNumber.map { ProactiveExhibit.Input.ean($0) }, exhibitAdapter.map { ProactiveExhibit.Input.exhibit(BulkIncludeExhibit(exhibits: [$0])) } ) .merge() .asDriver(onErrorDriveWith: .empty()) let removeExhibitsInput = Observable .merge(GlobalObservable.removeExhibitsForExhibitCamera, removeExhibitAdapter) .asDriver(onErrorDriveWith: .empty()) let replaceExhibitInput = replaceExhibitAdapter.asDriver(onErrorDriveWith: .empty()) viewModel = ExhibitCameraViewModel(input: input, removeExhibitsInput: removeExhibitsInput, replaceExhibitInput: replaceExhibitInput) Χϝϥ͔Β౉ͬͯ͘Δ&"/ίʔυͷετϦʔϜ

Slide 14

Slide 14 text

let input = Observable .of(scanCamera.barcodeNumber.map { ProactiveExhibit.Input.ean($0) }, exhibitAdapter.map { ProactiveExhibit.Input.exhibit(BulkIncludeExhibit(exhibits: [$0])) } ) .merge() .asDriver(onErrorDriveWith: .empty()) let removeExhibitsInput = Observable .merge(GlobalObservable.removeExhibitsForExhibitCamera, removeExhibitAdapter) .asDriver(onErrorDriveWith: .empty()) let replaceExhibitInput = replaceExhibitAdapter.asDriver(onErrorDriveWith: .empty()) viewModel = ExhibitCameraViewModel(input: input, removeExhibitsInput: removeExhibitsInput, replaceExhibitInput: replaceExhibitInput) λΠτϧը໘͔Β౉͞ΕΔ੡඼σʔλͷετϦʔϜ

Slide 15

Slide 15 text

let input = Observable .of(scanCamera.barcodeNumber.map { ProactiveExhibit.Input.ean($0) }, exhibitAdapter.map { ProactiveExhibit.Input.exhibit(BulkIncludeExhibit(exhibits: [$0])) } ) .merge() .asDriver(onErrorDriveWith: .empty()) let removeExhibitsInput = Observable .merge(GlobalObservable.removeExhibitsForExhibitCamera, removeExhibitAdapter) .asDriver(onErrorDriveWith: .empty()) let replaceExhibitInput = replaceExhibitAdapter.asDriver(onErrorDriveWith: .empty()) viewModel = ExhibitCameraViewModel(input: input, removeExhibitsInput: removeExhibitsInput, replaceExhibitInput: replaceExhibitInput) ೖྗΛ7JFX.PEFMͷॳظԽ࣌ʹ౉͢

Slide 16

Slide 16 text

1SPBDUJWF&YIJCJU*OQVUͰ දࣔॲཧ΍"1*ϦΫΤετॲཧΛ෼͚Δ

Slide 17

Slide 17 text

let fetchProgress = filteredInput .flatMap { [weak self] input -> Driver> in switch input { case .ean(let ean): let request = ExhibitAPI.FindByEAN(ean: ean) let response = APIClient.shared.response(request) .map { response -> (ProactiveExhibit.Input, [Exhibit]) in return (input, response.elements) } return Progress.makeDriver(response) case .exhibit(let exhibit): return Driver.empty() } } *OQVUFBOͷ৔߹ͷΈϦΫΤετ

Slide 18

Slide 18 text

class ExhibitScannedDisplayViewCell: UICollectionViewCell { // লུ var proactiveExhibit: ProactiveExhibit? { didSet { if let bulkIncludeExhibit = proactiveExhibit?.bulkIncludeExhibit { // ੡඼৘ใදࣔ } else { // ϓϨʔεϗϧμදࣔ } } } } "1*ϦΫΤετ͕ඞཁͳ৔߹ʢFBOʣ͸
 ϓϨʔεϗϧμΛදࣔ͢ΔΑ͏$FMMͰදࣔॲཧ

Slide 19

Slide 19 text

class ExhibitScannedDisplayViewCell: UICollectionViewCell { // লུ var proactiveExhibit: ProactiveExhibit? { didSet { if let bulkIncludeExhibit = proactiveExhibit?.bulkIncludeExhibit { // ੡඼৘ใදࣔ } else { // ϓϨʔεϗϧμදࣔ } } } } ೖྗʹܕΛఆٛ͢Δ͜ͱͰσʔλͦͷ΋ͷͱ͸
 ผͰॲཧ͕Ͱ͖ΔΑ͏ʹͳΔ

Slide 20

Slide 20 text

ෳ਺ͷೖྗΛͭͷܕͰදݱ w σʔλ͚ͩͰͳ͘ೖྗʹ΋ܕΛ w σʔλࣗମͷॲཧͱը໘ͷॲཧΛ෼཭͠΍͍͢ w ೖྗ಺༰ʹΑͬͯॲཧ͕ҟͳΔΑ͏ͳ৔߹ʹ༗ޮ w ࠓޙɺೖྗͷόϦΤʔγϣϯ͕૿͑ΔΑ͏ͳ͜ͱ͕͋ͬ ͯ΋ಉ͡ܕͰදݱ͢Δ͜ͱ͕Ͱ͖Δ w όϦΤʔγϣϯ͕૿͑ͨࡍ΋ίϯύΠϧΤϥʔ͕ग़Δͷ ͰɺҰͭҰͭରԠ͍͚ͯ͠͹ྑ͍

Slide 21

Slide 21 text

͓ΘΓ