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

いまから使える SpreadsheetView

いまから使える SpreadsheetView

Satoshi Hachiya

May 24, 2017
Tweet

More Decks by Satoshi Hachiya

Other Decks in Programming

Transcript

  1. Satoshi Hachiya Twitter: @jpmartha_jp • ฌݿݝਆށࢢࡏॅ • iOS ΤϯδχΞ /

    ίϛϡχςΟӡӦ • ౦ژͰ ʮPlayer!ʯͷ։ൃ • ࠃࡍΧϯϑΝϨϯεʮtry! Swift Tokyoʯɺʮtry! Swift NYCʯͳͲ
  2. Features (2/3) • Circular infinite scrolling automatically • ॥؀εΫϩʔϧ •

    Customize gridlines and borders for each cell • άϦουઢͱ࿮ઢͷΧελϚΠζ • Customize inter cell spacing vertically and horizontally • ಺ଆͷ༨നͷΧελϚΠζ
  3. UICollectionView ͷΑ͏ͳ API func numberOfColumns(in spreadsheetView: SpreadsheetView) -> Int func

    numberOfRows(in spreadsheetView: SpreadsheetView) -> Int func spreadsheetView(_ spreadsheetView: SpreadsheetView, cellForItemAt indexPath: IndexPath) -> Cell?
  4. Θ͔Γ΍͍͢Α͏୯७ʹ͠·ͨ͠ func mergedCells(in spreadsheetView: SpreadsheetView) -> [CellRange] { return [

    CellRange(from: (row: 0, column: 1), to: (row: 0, column: 2)), CellRange(from: (row: 0, column: 3), to: (row: 0, column: 4)), CellRange(from: (row: 2, column: 0), to: (row: 13, column: 0)), CellRange(from: (row: 14, column: 0), to: (row: 25, column: 0)), CellRange(from: (row: 26, column: 0), to: (row: 37, column: 0)), CellRange(from: (row: 38, column: 0), to: (row: 49, column: 0)), CellRange(from: (row: 50, column: 0), to: (row: 61, column: 0)), CellRange(from: (row: 62, column: 0), to: (row: 73, column: 0)), CellRange(from: (row: 74, column: 0), to: (row: 85, column: 0)), CellRange(from: (row: 86, column: 0), to: (row: 97, column: 0)), CellRange(from: (row: 98, column: 0), to: (row: 109, column: 0)), CellRange(from: (row: 110, column: 0), to: (row: 121, column: 0)), CellRange(from: (row: 122, column: 0), to: (row: 133, column: 0)), CellRange(from: (row: 8, column: 1), to: (row: 22, column: 1)), CellRange(from: (row: 23, column: 1), to: (row: 25, column: 1)) ] }
  5. Repository Latest commit Fixed column and row headers Merge cells

    Star kishikawakatsumi /SpreadsheetView 2017 ✅ ✅ 1,478 stuffrabbit/ SwiftSpreadsheet 2017 ✅ 379 mutualmobile/ MMSpreadsheetVi ew 2013 ✅ 171 darrarski/ DRCollectionView TableLayout-iOS 2015 ✅ 67 ʢ! ௐ΂ʣ
  6. !