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. 7.
  2. 8.
  3. 10.
  4. 11.

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

    larger structure such as a honeycomb. • େ૊৫தతҰݸᘐཱ૊੒ᄸݩ
  5. 14.
  6. 16.
  7. 17.
  8. 18.
  9. 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);
  10. 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);
  11. 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
  12. 24.

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

    ߦఔࣜᛰ • ௒ڃఈ૚ • ಹݸ೥୅ᔒ༗ॴҦత APIɼ୞༗ System Callɻ
  13. 27.
  14. 29.
  15. 30.

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

    Ṝݸ࣌ظతඪ४։ᚙ഑උɻ • 㚎ݐॴݟଈॴಘతUI ઃܭ޻۩ɻ
  16. 32.
  17. 33.

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

    APIɻ • ࡏ OS X ্໵ՄҎ䋯Ṝࠣ APIɻ • ᩋᢜతఔࣜՄҎߋ༰қҠ২౸ OS X ্ɻ
  18. 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 );
  19. 36.
  20. 38.

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

    త෦෼᜝ҝ AppKit • CocoaHeads త༝ိ
  21. 40.

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

    ፤ိ։ Slack ౎ෆⴺɻ • େ෦෼༻ࡏ NSControl
  22. 42.
  23. 46.
  24. 48.

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

    *)indexPath; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
  25. 54.
  26. 62.

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

    త࣌ީՄҎࣗಈ Init Cellɼෆ༻ࣗݾ InitɼᩋେՈ ෆ༻࠶൑Ꮧधෆधཁ Init Cell
  27. 73.

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

    tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) • ՄҎᩋCellత㚎༰ൺֱૣᰖࣔɻ
  28. 77.

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

    • ࠶໵ෆधཁመ࡞ moveRowAt ɼ୞ཁመ࡞ Drag & Drop ब ޷
  29. 82.
  30. 85.

    Cell is dead, 
 Long live Cell • Cell ኺҰ։࢝తᙘᅷ֨ࢠᎷల౸֤छෆಉత஍ํɼ૾ੋ

    Apple watch ্త Complication • ՄҎ؃౸Cell ຫຫత෼䈚੒ၷछෆಉ༻్ɼՄҎᘐཱӡ࡞ తখݩ݅ɼ҃ੋඃ᧋ࡏ༰ث㚎తݩ݅ɻ