Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Macアプリを作って憶えるRxSwift

yimajo
April 14, 2016

 Macアプリを作って憶えるRxSwift

RxSwift勉強会発表資料です
http://connpass.com/event/27933/

yimajo

April 14, 2016
Tweet

More Decks by yimajo

Other Decks in Technology

Transcript

  1. SY@UFYU w 3Y4XJGUͷجૅతͳ࢖͍ํ௨ΓWBMJEBUF w ݕࡧจࣈ͕͋Ε͹ݕࡧϘλϯΛ׆ੑԽ let searchValid = searchField.rx_text .map{

    text -> Bool in 0 < text.characters.count } searchValid .bindTo(searchButton.rx_enabled) .addDisposableTo(disposeBag)
  2. // Commentϓϩτίϧ protocol CommentType { func type() -> Comment func

    identifier() -> String func message() -> String func imageURL() -> NSURL? } enum Comment { case Tweet case Announce } // TweetΛJSON͔ΒΤϯςΟςΟԽ // HimotokiͷDecodableΛܧঝ struct Tweet: Decodable { //…লུ… } // ϓϩτίϧͷ࣮૷෦ extension Tweet: CommentType { //…লུ… } // ΞϓϦ͔Βͷϝοηʔδ৘ใ struct Announce: CommentType { //…লུ… }
  3. 5XJUUFSͷ,FZೖྗ͸.77. "VUI 7JFX.PEFM w $POTVNFS,FZͱ 4FDSFUΛWBMJEBUF͢Δ w ໰୊ͳͦ͞͏ͳΒϒϥ ΢βىಈ͢Δ "VUI

    7JFX$POUSPMMFS w $POTVNFS,FZͱ 4FDSFUΛೖྗͤ͞ w "VUI7JFX.PEFMʹ 0"VUI4XJGU w 0"6UIͷ ॺ໊Λ࡞੒ Ͱ͖Δ
  4. 5XFFU4FBSDI 7JFX$POUSPMMFS $PNNFOU'MPX 1SFTFOUFS w 6*͔ΒͷΠϕϯτΛॲཧ w ݕࡧ͢ΔจݴΛೖྗ w දࣔ͢Δը໘ΛબͿ

    w 5XFFU4USFBN"1*ͷ 6TF$BTFΛݺͼग़͢ w "OOPVODF6TF$BTFΛݺ ͼग़͢ w NFSHF͠TVCTDSJCF w 7JFXʹͯ͠ը໘্ʹྲྀ͢ 5XJUUFS4USFBN"1* 6TF$BTF w 5XJUUFS4USFBN"1*Λݺ ͼग़͠1VCMJTI4VCKFDU "OOPVODF 6TF$BTF w ΞϓϦ͕ࣗಈͰදࣔ͢Δ ίϝϯτΛ0CTFSWBCMF ʹ 1SFTFOUBUJPO૚ %PNBJO૚ *OGSB૚ 5XJUUFS"1* )JNPUPLJ 5XFFUදࣔ͸ϨΠϠʔυ෩ΞʔΩςΫνϟ ࢀߟ IUUQTUFDISFDSVJUNQDPKQNPCJMFQPTU w )JNPUPLJ͸͍͍ͧ w 4USFBN"1* Λݺͼग़ͤΔ