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

Life of a Cell

3f7d9611fc919c98512b779cde637dfc?s=47 Johnlin
October 20, 2018

Life of a Cell

iPlayground 2018

3f7d9611fc919c98512b779cde637dfc?s=128

Johnlin

October 20, 2018
Tweet

Transcript

  1. Life of a Cell John Lin

  2. John Lin • @johnlinvc on Twitter • 100 % Taiwanese

    • Working @ Exosite
  3. • https://weekly.codetengu.com/ • A (usually) weekly tech newsletter in Chinese

    • All aspect of software development
  4. Swift Taipei • http://swift.taipei • 㑌݄ୈҰݸᜌ፨ೋᎯ㭎ɼݱ৔༗᫊৯࿨ҿྉ • ੣㐸ߨऀத • ༝

    iCHEF ᩶ॿᎯ㭎
  5. ೈᱪߟݹላ • ೈᱪߟݹላత㚎༰แׅሣೈᱪ໛૊తٯ޲޻ఔɺጯ༻ڐଟ ෆಉత޻۩ٴఔংိᚙ۷ఔࣜՍߏɼฒ׌ؐݪઃܭత૬᮫ ࢿ㘤ɻ -- Wiki

  6. ೈᱪߟݹላ • ݚڀೈᱪԋਐ࢙ • ؑԟ஌ိ

  7. None
  8. None
  9. Cell (໊ࢺ) • ᄸਓ࿚๪ɼখन๪ʀʢमಓӃతʣᄸਓখࣨ

  10. None
  11. Cell (໊ࢺ) • ᄸਓ࿚๪ɼখन๪ʀʢमಓӃతʣᄸਓখࣨ • A small compartment in a

    larger structure such as a honeycomb. • େ૊৫தతҰݸᘐཱ૊੒ᄸݩ
  12. ᩋզ၇ճ౸աڈ

  13. First Computer

  14. Macintosh

  15. 1984 The First Macintosh

  16. System 1

  17. MacPaint

  18. MacPaint

  19. ̢acPaint • ༻ Pascal ౥഑ Assembly ሜత • Ұڞ 10250

    ߦఔࣜᛰ
  20. MacPaint.p PROCEDURE DrawPat; VAR i,h: INTEGER; tempRect: Rect; savePort: GrafPtr;

    BEGIN GetPort(savePort); SetPort(@deskWind); OffsetRect(patRect,1,1); PaintRect(patRect); OffsetRect(patRect,-1,-1); EraseRect(patRect); FrameRect(patRect);
  21. MyTools.a .DEF SetPort SetPort .WORD $AC73 .DEF GetPort GetPort .WORD

    $AC74
  22. MacPaint.p h := patStart; FOR i := 0 TO patRow-1

    DO BEGIN tempRect.left := h; h := h + patSpace; tempRect.right := h - 1; tempRect.top := patTop+1; tempRect.bottom := patMid; FillRect(tempRect,patterns[i]); tempRect.top := patMid + 1; tempRect.bottom := patBottom-1; FillRect(tempRect,patterns[i+patRow]); END; SetPort(savePort);
  23. PROCEDURE ProcessTheEvent; VAR where: Point; menuResult: LongInt; i: INTEGER; code:

    INTEGER; whichWindow: WindowPtr; ... BEGIN IF PtInRect(theEvent.where,toolRect) THEN ChooseTool(theEvent.where); IF PtInRect(theEvent.where,lineRect) THEN ChooseLine(theEvent.where); IF PtInRect(theEvent.where,patRect) THEN ChoosePat(theEvent.where); MacPaint.p
  24. ̢acPaint • ༻ Pascal ౥഑ Assembly ሜత • Ұڞ 10250

    ߦఔࣜᛰ • ௒ڃఈ૚ • ಹݸ೥୅ᔒ༗ॴҦత APIɼ୞༗ System Callɻ
  25. 1985-1993 System 2 - System 7

  26. System 2-7

  27. MacApp • Apple ։ᚙతҰ੔౟ GUI API • ୞༗ܥ౷ APIɼෆաࢸগෆ༻ሜ Assembly

    ྃɻ • ౥഑ Macintosh Programmer's Workshop ࢖༻
  28. 1993-1998 Mac OS 7-9

  29. None
  30. Powerplant • Ұ౟ୈࡾํత GUI Framework ɼ㚎ݐࡏ Code Warrior ཫɻ •

    Ṝݸ࣌ظతඪ४։ᚙ഑උɻ • 㚎ݐॴݟଈॴಘతUI ઃܭ޻۩ɻ
  31. 1998 Mac OSX announced

  32. OS X

  33. Carbon API • ೺ Ұࠣ OS 8 ೭ޙब༗త API ڈ෥ଘᣰɼแ᧋੒Ұ౟

    APIɻ • ࡏ OS X ্໵ՄҎ䋯Ṝࠣ APIɻ • ᩋᢜతఔࣜՄҎߋ༰қҠ২౸ OS X ্ɻ
  34. ListView in Carbon OSStatus CreateCustomList ( const Rect * rView,

    const ListBounds * dataBounds, Point cellSize, const ListDefSpec * theSpec, WindowRef theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert, ListHandle * outList );
  35. 2001-2007 Mac OSX 10.0 - 10.5

  36. Xcode

  37. Interface Builder

  38. Cocoa API • ኺ NextStep Ҡ২աိతҰ੔౟ GUI Framework • UI

    త෦෼᜝ҝ AppKit • CocoaHeads త༝ိ
  39. NSView • ૊੒UI తجૅᄸҐɻ • ෛ੹႔ཧ៸ᅷ࿨༌ೖࣄ݅ʢ׈૏ɼ伴൫ʣ

  40. NSCell • ᫊ྔత NSView • ᙛ೥iMac G4 ୞༗ 256MB RAM,

    ፤ိ։ Slack ౎ෆⴺɻ • େ෦෼༻ࡏ NSControl
  41. 2007 iPhone Released

  42. None
  43. 2008 iPhone OS 2.0 released

  44. App Store • ऴԙՄҎሜڅ iPhone 䋯తఔࣜྃ • ࣕ׌ՄҎᩯ᭝

  45. Cocoa Touch • iPhone OS ্త SDK • ႔ཧ UI

    త෦෼᜝ҝ UIKit
  46. None
  47. UITableViewCell

  48. UITableViewDataSource • ኺ 2.0 ޙबᔒ༗վᏓա - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath

    *)indexPath; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
  49. 2009 iPhone OS 3 released

  50. 㚎ݐߋଟ Cell తᒬࣜ

  51. Core Data • ᩋਓຢѪຢ࠘తORMɼሜୈҰ൛኷շɻୠ೭ޙଟਓ։ᚙब ။ Conflict ౸༗ᴍ൥ɻ

  52. UILocalizedIndexedCollation • ෆੋ㣥ࡨࣈɼਅతੋ Collationɼ੔ཧతҙࢥɻ • ෆҝਓ஌త APIɼ༻ိ㢨๩႔ཧ Cell ጯ֘ሱԙ 䬟Ұݸ

    Section త໰୊ɻ • ࣕ׌။ࣗಈሣෆಉޠܥ၏ෆಉత႔ཧɻ
  53. 2010 iOS 4 Released

  54. Xcode 4

  55. 2011 iOS 5 Released

  56. allowsMultipleSelection • UITableView.allowsMultipleSelection • 㚎ݐ႔ཧଟબ • indexPathsForSelectedRows ՄҎ፤౸ඃબత row

  57. StoryBoard

  58. 2012 iOS 6 Released

  59. UICollectionView

  60. AutoLayout • ᩋ View ೭ؒޓ૬ڠௐᎹ์తҐஔ࿨େখ • ҝྃᩋఔࣜՄҎૣҰᴍࢧԉ iPhone 5

  61. UIRefreshControl

  62. ؆қCell init • ՄҎሣ TableView Ḽ࡭ Cell Class/XIB • dequeue

    త࣌ީՄҎࣗಈ Init Cellɼෆ༻ࣗݾ InitɼᩋେՈ ෆ༻࠶൑Ꮧधෆधཁ Init Cell
  63. 2013 iOS 7 Released

  64. estimatedRowHeight • ೺ Cell େখతܭࢉኺ Init త࣌ީԆ؇౸ Cell ग़ݱత࣌ީ •

    ᩋ TableView Ұ։࢝త Loading ଎౓Ꮣշɻ
  65. 2014 iOS 8 Released

  66. Self Sizing Cell • ಁա Auto Layout, Cell ՄҎࣗݾܾఆጯ֘௕ଟߴɻ

  67. UITableViewRowAction

  68. 2015 iOS 9 Released

  69. UIStackView

  70. Collection 㚎ݐࢧԉ䇪፮

  71. WatchOS Complication

  72. 2016 iOS 10 Released

  73. ༬ઌᩇऔCell ࢿྉ • UITableViewDataSourcePrefetching • ܥ౷။㢨༗Մೳ။ඃᰖࣔత Cell ݺڣ
 func tableView(_

    tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) • ՄҎᩋCellత㚎༰ൺֱૣᰖࣔɻ
  74. UICollectionViewTableCell • ༗ਓᚙݱྃṜݸਆൿత private APIɻ • ՄҎᩋCollectionView ࣗ༝తࡏ Collection ໛ࣜ࿨

    Table ໛ ࣜ೭ؒ੾׵ɻ • ೭ޙ㘸ෆఆबᔒ༗ TableView ྃ
  75. 2017 iOS 11 Released

  76. Drag & Drop

  77. Drag & Drop • ࿨Ҏલత moveRowAt ෆಉత஍ํࡏԙՄҎލ App 䇪፮ɼ ࣕ׌ՄҎҰ࣍䇪፮ଟݸ෺݅

    • ࠶໵ෆधཁመ࡞ moveRowAt ɼ୞ཁመ࡞ Drag & Drop ब ޷
  78. Swipe action

  79. 2018 iOS 12 Released

  80. More Watch Complication

  81. 2018-2022 Running iOS on Mac

  82. Marzipan • ࡏMac ্䋯 iOS ఔࣜɻ • ༗ᔒ༗᧷ಘࣅિ૬ࣝʁ • ब૾ᙛ೥

    OS 9 ᫚ OS X ҰᒬɼᩋେՈ༻࠷շత଎౓Ҡ২ App
  83. 2022-2025 AppleKit ?

  84. AppleKit? • ࡏ༻ Marzipan ᩋେՈᱪᱛա Code once, Debug everywhereޙɼ။ਪग़Ұݸਅʂᔟ༻ SDKɼ

    • େ֓။ڣ၏ AppleKitɻ୞ཁੋ Apple 㗞඼౎ೳ䋯ɻ
  85. Cell is dead, 
 Long live Cell • Cell ኺҰ։࢝తᙘᅷ֨ࢠᎷల౸֤छෆಉత஍ํɼ૾ੋ

    Apple watch ্త Complication • ՄҎ؃౸Cell ຫຫత෼䈚੒ၷछෆಉ༻్ɼՄҎᘐཱӡ࡞ తখݩ݅ɼ҃ੋඃ᧋ࡏ༰ث㚎తݩ݅ɻ
  86. ̦&A • John Lin • @johnlinvc on Twitter • Join

    Us at Swift Taipei