Slide 1

Slide 1 text

Life of a Cell John Lin

Slide 2

Slide 2 text

John Lin • @johnlinvc on Twitter • 100 % Taiwanese • Working @ Exosite

Slide 3

Slide 3 text

• https://weekly.codetengu.com/ • A (usually) weekly tech newsletter in Chinese • All aspect of software development

Slide 4

Slide 4 text

Swift Taipei • http://swift.taipei • 㑌݄ୈҰݸᜌ፨ೋᎯ㭎ɼݱ৔༗᫊৯࿨ҿྉ • ੣㐸ߨऀத • ༝ iCHEF ᩶ॿᎯ㭎

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Cell (໊ࢺ) • ᄸਓ࿚๪ɼখन๪ʀʢमಓӃతʣᄸਓখࣨ • A small compartment in a larger structure such as a honeycomb. • େ૊৫தతҰݸᘐཱ૊੒ᄸݩ

Slide 12

Slide 12 text

ᩋզ၇ճ౸աڈ

Slide 13

Slide 13 text

First Computer

Slide 14

Slide 14 text

Macintosh

Slide 15

Slide 15 text

1984 The First Macintosh

Slide 16

Slide 16 text

System 1

Slide 17

Slide 17 text

MacPaint

Slide 18

Slide 18 text

MacPaint

Slide 19

Slide 19 text

̢acPaint • ༻ Pascal ౥഑ Assembly ሜత • Ұڞ 10250 ߦఔࣜᛰ

Slide 20

Slide 20 text

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);

Slide 21

Slide 21 text

MyTools.a .DEF SetPort SetPort .WORD $AC73 .DEF GetPort GetPort .WORD $AC74

Slide 22

Slide 22 text

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);

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

̢acPaint • ༻ Pascal ౥഑ Assembly ሜత • Ұڞ 10250 ߦఔࣜᛰ • ௒ڃఈ૚ • ಹݸ೥୅ᔒ༗ॴҦత APIɼ୞༗ System Callɻ

Slide 25

Slide 25 text

1985-1993 System 2 - System 7

Slide 26

Slide 26 text

System 2-7

Slide 27

Slide 27 text

MacApp • Apple ։ᚙతҰ੔౟ GUI API • ୞༗ܥ౷ APIɼෆաࢸগෆ༻ሜ Assembly ྃɻ • ౥഑ Macintosh Programmer's Workshop ࢖༻

Slide 28

Slide 28 text

1993-1998 Mac OS 7-9

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Powerplant • Ұ౟ୈࡾํత GUI Framework ɼ㚎ݐࡏ Code Warrior ཫɻ • Ṝݸ࣌ظతඪ४։ᚙ഑උɻ • 㚎ݐॴݟଈॴಘతUI ઃܭ޻۩ɻ

Slide 31

Slide 31 text

1998 Mac OSX announced

Slide 32

Slide 32 text

OS X

Slide 33

Slide 33 text

Carbon API • ೺ Ұࠣ OS 8 ೭ޙब༗త API ڈ෥ଘᣰɼแ᧋੒Ұ౟ APIɻ • ࡏ OS X ্໵ՄҎ䋯Ṝࠣ APIɻ • ᩋᢜతఔࣜՄҎߋ༰қҠ২౸ OS X ্ɻ

Slide 34

Slide 34 text

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 );

Slide 35

Slide 35 text

2001-2007 Mac OSX 10.0 - 10.5

Slide 36

Slide 36 text

Xcode

Slide 37

Slide 37 text

Interface Builder

Slide 38

Slide 38 text

Cocoa API • ኺ NextStep Ҡ২աိతҰ੔౟ GUI Framework • UI త෦෼᜝ҝ AppKit • CocoaHeads త༝ိ

Slide 39

Slide 39 text

NSView • ૊੒UI తجૅᄸҐɻ • ෛ੹႔ཧ៸ᅷ࿨༌ೖࣄ݅ʢ׈૏ɼ伴൫ʣ

Slide 40

Slide 40 text

NSCell • ᫊ྔత NSView • ᙛ೥iMac G4 ୞༗ 256MB RAM, ፤ိ։ Slack ౎ෆⴺɻ • େ෦෼༻ࡏ NSControl

Slide 41

Slide 41 text

2007 iPhone Released

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

2008 iPhone OS 2.0 released

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

Cocoa Touch • iPhone OS ্త SDK • ႔ཧ UI త෦෼᜝ҝ UIKit

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

UITableViewCell

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

2009 iPhone OS 3 released

Slide 50

Slide 50 text

㚎ݐߋଟ Cell తᒬࣜ

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

UILocalizedIndexedCollation • ෆੋ㣥ࡨࣈɼਅతੋ Collationɼ੔ཧతҙࢥɻ • ෆҝਓ஌త APIɼ༻ိ㢨๩႔ཧ Cell ጯ֘ሱԙ 䬟Ұݸ Section త໰୊ɻ • ࣕ׌။ࣗಈሣෆಉޠܥ၏ෆಉత႔ཧɻ

Slide 53

Slide 53 text

2010 iOS 4 Released

Slide 54

Slide 54 text

Xcode 4

Slide 55

Slide 55 text

2011 iOS 5 Released

Slide 56

Slide 56 text

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

Slide 57

Slide 57 text

StoryBoard

Slide 58

Slide 58 text

2012 iOS 6 Released

Slide 59

Slide 59 text

UICollectionView

Slide 60

Slide 60 text

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

Slide 61

Slide 61 text

UIRefreshControl

Slide 62

Slide 62 text

؆қCell init • ՄҎሣ TableView Ḽ࡭ Cell Class/XIB • dequeue త࣌ީՄҎࣗಈ Init Cellɼෆ༻ࣗݾ InitɼᩋେՈ ෆ༻࠶൑Ꮧधෆधཁ Init Cell

Slide 63

Slide 63 text

2013 iOS 7 Released

Slide 64

Slide 64 text

estimatedRowHeight • ೺ Cell େখతܭࢉኺ Init త࣌ީԆ؇౸ Cell ग़ݱత࣌ީ • ᩋ TableView Ұ։࢝త Loading ଎౓Ꮣշɻ

Slide 65

Slide 65 text

2014 iOS 8 Released

Slide 66

Slide 66 text

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

Slide 67

Slide 67 text

UITableViewRowAction

Slide 68

Slide 68 text

2015 iOS 9 Released

Slide 69

Slide 69 text

UIStackView

Slide 70

Slide 70 text

Collection 㚎ݐࢧԉ䇪፮

Slide 71

Slide 71 text

WatchOS Complication

Slide 72

Slide 72 text

2016 iOS 10 Released

Slide 73

Slide 73 text

༬ઌᩇऔCell ࢿྉ • UITableViewDataSourcePrefetching • ܥ౷။㢨༗Մೳ။ඃᰖࣔత Cell ݺڣ
 func tableView(_ tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) • ՄҎᩋCellత㚎༰ൺֱૣᰖࣔɻ

Slide 74

Slide 74 text

UICollectionViewTableCell • ༗ਓᚙݱྃṜݸਆൿత private APIɻ • ՄҎᩋCollectionView ࣗ༝తࡏ Collection ໛ࣜ࿨ Table ໛ ࣜ೭ؒ੾׵ɻ • ೭ޙ㘸ෆఆबᔒ༗ TableView ྃ

Slide 75

Slide 75 text

2017 iOS 11 Released

Slide 76

Slide 76 text

Drag & Drop

Slide 77

Slide 77 text

Drag & Drop • ࿨Ҏલత moveRowAt ෆಉత஍ํࡏԙՄҎލ App 䇪፮ɼ ࣕ׌ՄҎҰ࣍䇪፮ଟݸ෺݅ • ࠶໵ෆधཁመ࡞ moveRowAt ɼ୞ཁመ࡞ Drag & Drop ब ޷

Slide 78

Slide 78 text

Swipe action

Slide 79

Slide 79 text

2018 iOS 12 Released

Slide 80

Slide 80 text

More Watch Complication

Slide 81

Slide 81 text

2018-2022 Running iOS on Mac

Slide 82

Slide 82 text

Marzipan • ࡏMac ্䋯 iOS ఔࣜɻ • ༗ᔒ༗᧷ಘࣅિ૬ࣝʁ • ब૾ᙛ೥ OS 9 ᫚ OS X ҰᒬɼᩋେՈ༻࠷շత଎౓Ҡ২ App

Slide 83

Slide 83 text

2022-2025 AppleKit ?

Slide 84

Slide 84 text

AppleKit? • ࡏ༻ Marzipan ᩋେՈᱪᱛա Code once, Debug everywhereޙɼ။ਪग़Ұݸਅʂᔟ༻ SDKɼ • େ֓။ڣ၏ AppleKitɻ୞ཁੋ Apple 㗞඼౎ೳ䋯ɻ

Slide 85

Slide 85 text

Cell is dead, 
 Long live Cell • Cell ኺҰ։࢝తᙘᅷ֨ࢠᎷల౸֤छෆಉత஍ํɼ૾ੋ Apple watch ্త Complication • ՄҎ؃౸Cell ຫຫత෼䈚੒ၷछෆಉ༻్ɼՄҎᘐཱӡ࡞ తখݩ݅ɼ҃ੋඃ᧋ࡏ༰ث㚎తݩ݅ɻ

Slide 86

Slide 86 text

̦&A • John Lin • @johnlinvc on Twitter • Join Us at Swift Taipei