iOSDC_LT.pdf

11d3072d628a7b976cd2f4e6a3cf750f?s=47 aboy
September 01, 2018

 iOSDC_LT.pdf

iOSDC 2018 9/1(土)のルーキーズLT枠で発表した内容です

11d3072d628a7b976cd2f4e6a3cf750f?s=128

aboy

September 01, 2018
Tweet

Transcript

  1. 4.

    ˏcosmeΞϓϦͷͭ͘Γ • MVVM/Clean Architecture + RxSwift • جຊ 1view <=>

    1view model • xib/storyboardʹΑΔview؅ཧ • جຊ 1view <=> 1xib/storyboard • AutoLayout/UIStackViewΰϦΰϦ࢖ͬͯΔ
  2. 7.
  3. 8.

    Textureͱ͸ • Pinterest͕࡞ͬͯΔඇಉظUIϑϨʔϜϫʔΫ • ϨΠΞ΢τܭࢉ͸όοΫάϥ΢ϯυεϨουͰඇಉظతʹߦ ΘΕΔ • ϨΠΞ΢τ͸શͯίʔυͰߦ͏ • CSS

    FlexboxϥΠΫͳಠࣗͷϨΠΞ΢τAPI • UIKitͰ͍͏View͸TextureͰ͸NodeͱݺͿ • UIKitͷओཁͳView͸˓˓NodeʹϦϓϨΠε͞ΕͯΔ https://github.com/TextureGroup/Texture
  4. 11.

    UIKit͔ΒTexture΁ͷஔ͖׵͑ • UITableViewCell -> ASCellNode • UIView -> ASDisplayNode •

    ViewModel͸ͦͷ··ར༻Մೳ • attributed string΍isHiddenܥͷ஋͸ ViewModelͰ؅ཧ͠View΁όΠϯσΟϯά
  5. 12.

    • ଞͷը໘Ͱ΋࢖͍ͬͯΔڞ௨ύʔπ͸࠷ѱ UIViewͷϥοϓͰରԠ • ͨͩ͠ϝΠϯεϨου͕࢖ΘΕΔ UIKit͔ΒTexture΁ͷஔ͖׵͑ node = ASDisplayNode {

    () -> UIView in let view = StarView(frame: CGRect.zero) view.configure(component.displayScore) //configure return view }
  6. 13.

    ϨΠΞ΢τ override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { let

    baseStack = ASStackLayoutSpec.vertical() baseStack.spacing = 4.0 // UIStackView.Spacing var verticalElements: [ASLayoutElement] = [] if let messageNode = messageNode { verticalElements.append(messageNode) } verticalElements.append(contentNode) verticalElements.append(footerNode) baseStack.children = verticalElements return ASInsetLayoutSpec( insets: UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0), child: baseStack ) }