Storyboards and Controllers on OS X

Size: px
Start display at page:

Download "Storyboards and Controllers on OS X"

Transcription

1 Frameworks #WWDC14 Storyboards and Controllers on OS X Contain yourself Session 212 Mike Swingler Interface Builder Engineer Raleigh Ledet AppKit Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

2 Introduction Cool new API concepts Storyboards View controllers Window controllers Gesture recognizers

3 Storyboards Lines and boxes and segues, oh my

4 Storyboards on OS X Xcode

5 Storyboards on OS X Xcode

6 Storyboards on OS X Xcode

7 Storyboards on OS X Xcode

8 Storyboards on OS X Xcode

9 Storyboards on OS X Xcode

10 Storyboards on OS X Xcode

11 Storyboards on OS X Xcode

12 Storyboards on OS X View Controllers Connection between model and view

13 Storyboards on OS X View Controllers Connection between model and view

14 Storyboards on OS X View Controllers Connection between model and view Place views

15 Storyboards on OS X View Controllers Connection between model and view Place views

16 Storyboards on OS X View Controllers Connection between model and view Place views Setup Auto Layout constraints

17 Storyboards on OS X View Controllers Connection between model and view Place views Setup Auto Layout constraints Connect actions and outlets

18 Storyboards on OS X View Controllers Connection between model and view Place views Setup Auto Layout constraints Connect actions and outlets

19 Storyboards on OS X View Controllers Connection between model and view Place views Setup Auto Layout constraints Connect actions and outlets

20 Storyboards on OS X View Controllers Connection between model and view Place views Setup Auto Layout constraints Connect actions and outlets

21 Storyboards on OS X Segues

22 Storyboards on OS X Segues

23 Storyboards on OS X Segues Containment Window Split Tab

24 Storyboards on OS X Segues Containment Window Split Tab Presentation Modal Sheet Popover

25 Storyboards on OS X Segues Containment Window Split Tab Presentation Modal Sheet Popover - (void)prepareforsegue:(nsstoryboardsegue *)segue sender:(id)sender;

26 Storyboards on OS X Build and run time

27 Storyboards on OS X Build and run time

28 Storyboards on OS X Build and run time

29 Storyboards on OS X Build and run time

30 Storyboards on OS X Build and run time

31 Storyboards on OS X Build and run time

32 Storyboards on OS X Build and run time

33 Storyboards on OS X Build and run time

34 Storyboards on OS X Build and run time Pages.storyboardc

35 Storyboards on OS X Build and run time Pages.storyboardc

36 Storyboards on OS X Build and run time Pages.storyboardc

37 Storyboards on OS X Build and run time Pages.storyboardc

38 Storyboards on OS X Build and run time Pages.storyboardc Pages.app

39 Storyboards on OS X Build and run time

40 Demo Getting started with Storyboards on OS X Mike Swingler

41 API Looking under the hood Raleigh Ledet AppKit Engineer

42 API Looking under the hood Storyboards View controllers Window controllers Gesture recognizers

43 Storyboard

44 Storyboard NSMainStoryboardFile

45 Storyboard + (instancetype)storyboardwithname:(nsstring *)name bundle:(nsbundle *)storyboardbundleornil; - (id)instantiateinitialcontroller; - (id)instantiatecontrollerwithidentifier:(nsstring *)identifier;

46 Storyboard + (instancetype)storyboardwithname:(nsstring *)name bundle:(nsbundle *)storyboardbundleornil; - (id)instantiateinitialcontroller; - (id)instantiatecontrollerwithidentifier:(nsstring *)identifier;

47 Storyboard + (instancetype)storyboardwithname:(nsstring *)name bundle:(nsbundle *)storyboardbundleornil; - (id)instantiateinitialcontroller; - (id)instantiatecontrollerwithidentifier:(nsstring *)identifier;

48 Storyboard + (instancetype)storyboardwithname:(nsstring *)name bundle:(nsbundle *)storyboardbundleornil; - (id)instantiateinitialcontroller; - (id)instantiatecontrollerwithidentifier:(nsstring *)identifier;

49 NSViewController Loading and layout Containers Triggered segues Manual presentation

50 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout;

51 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = NO; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; ViewController -init

52 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = NO; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; ViewController -loadview

53 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; ViewController -loadview -setview: V

54 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; ViewController -loadview -setview: V

55 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; ViewController - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; V - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout;

56 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; ViewController - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; V - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout;

57 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; ViewController V - (void)viewdiddisappear; V V - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; -addsubview: -sethidden:no V V -orderfront:

58 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; ViewController - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; V V V V V V

59 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; ViewController - (void)viewdidappear; - (void)viewwilldisappear; - (void)viewdiddisappear; - (void)updateviewconstraints; - (void)viewwilllayout; - (void)viewdidlayout; V V V V V V V

60 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; - (void)viewwilldisappear; ViewController V - (void)viewdiddisappear; V V V V - (void)updateviewconstraints; V V V V - (void)viewwilllayout; -orderout: - (void)viewdidlayout; -sethidden:yes -removefromsuperview V V

61 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; ViewController V - (void)viewwilldisappear; - (void)viewdiddisappear; V V V V - (void)updateviewconstraints; V V V V - (void)viewwilllayout; - (void)viewdidlayout; V V

62 NSViewController View loading, display, and (readonly, getter=isviewloaded) BOOL viewloaded = YES; - (void)viewdidload; - (void)viewwillappear; - (void)viewdidappear; ViewController V - (void)viewwilldisappear; - (void)viewdiddisappear; V V V V - (void)updateviewconstraints; V V V V - (void)viewwilllayout; - (void)viewdidlayout; V V

63 NSViewController Now in responder chain

64 NSViewController Now in responder chain CanvasView

65 NSViewController Now in responder chain CanvasView NSSplitView Window Window s WindowController

66 NSViewController Now in responder chain CanvasView NSSplitView Window Window s WindowController CanvasView Controller NSSplitView Controller

67 NSViewController Now in responder chain CanvasView NSSplitView Window Window s WindowController CanvasView Controller NSSplitView Controller

68 NSViewController Containment

69 NSTabViewController

70 NSTabViewController Manages an NSTabView

71 NSTabViewController Manages an NSTabView Lazily loads tab views

72 NSTabViewController Manages an NSTabView Lazily loads tab views Easy tab customization

73 NSTabViewController Manages an NSTabView Lazily loads tab views Easy tab customization Easily use toolbar as tab switcher

74 NSTabViewController Containment Properties of NSTabViewItem -identifier -label -tooltip NSTabView NSTabViewItem NSTabViewItem NSTabViewItem view view view

75 NSTabViewController Containment Properties of NSTabViewItem -identifier -label -tooltip NSTabView NSTabViewItem NSTabViewItem NSTabViewItem view view view

76 NSTabViewController Containment Properties of NSTabViewItem -identifier -label -tooltip NSTabView NSTabViewItem NSTabViewItem NSTabViewItem view view view

77 NSTabViewController Containment Properties of NSTabViewItem -identifier -label -color -tooltip -viewcontroller -image NSTabView NSTabViewItem NSTabViewItem NSTabViewItem view view view

78 NSTabViewController Containment Properties of NSTabViewItem -identifier -label NSTabView -color -tooltip -viewcontroller -image NSTabViewController NSTabViewItem NSTabViewItem NSTabViewItem NSViewController NSViewController NSViewController view view view

79 NSTabViewController (copy) NSArray NSInteger selectedtabviewitemindex; NSTabViewItem NSTabViewItem - (void)addtabviewitem:(nstabviewitem *)tabviewitem; - (void)inserttabviewitem:(nstabviewitem *)tabviewitem atindex:(nsinteger)index; - (void)removetabviewitem:(nstabviewitem *)tabviewitem; - (NSTabViewItem *)tabviewitemforviewcontroller:(nsviewcontroller *)vc;

80 NSTabViewController (copy) NSArray NSInteger selectedtabviewitemindex; NSTabViewItem NSTabViewItem - (void)addtabviewitem:(nstabviewitem *)tabviewitem; - (void)inserttabviewitem:(nstabviewitem *)tabviewitem atindex:(nsinteger)index; - (void)removetabviewitem:(nstabviewitem *)tabviewitem; - (NSTabViewItem *)tabviewitemforviewcontroller:(nsviewcontroller *)vc;

81 NSTabViewController (copy) NSArray NSInteger selectedtabviewitemindex; NSTabViewItem NSTabViewItem - (void)addtabviewitem:(nstabviewitem *)tabviewitem; - (void)inserttabviewitem:(nstabviewitem *)tabviewitem atindex:(nsinteger)index; - (void)removetabviewitem:(nstabviewitem *)tabviewitem; - (NSTabViewItem *)tabviewitemforviewcontroller:(nsviewcontroller *)vc;

82 NSTabViewController (copy) NSArray NSInteger selectedtabviewitemindex; NSTabViewItem NSTabViewItem - (void)addtabviewitem:(nstabviewitem *)tabviewitem; - (void)inserttabviewitem:(nstabviewitem *)tabviewitem atindex:(nsinteger)index; - (void)removetabviewitem:(nstabviewitem *)tabviewitem; - (NSTabViewItem *)tabviewitemforviewcontroller:(nsviewcontroller *)vc;

83 NSTabViewController (copy) NSArray NSInteger selectedtabviewitemindex; NSTabViewItem NSTabViewItem - (void)addtabviewitem:(nstabviewitem *)tabviewitem; - (void)inserttabviewitem:(nstabviewitem *)tabviewitem atindex:(nsinteger)index; - (void)removetabviewitem:(nstabviewitem *)tabviewitem; - (NSTabViewItem *)tabviewitemforviewcontroller:(nsviewcontroller *)vc;

84 NSTabViewController (copy) NSArray NSInteger selectedtabviewitemindex; NSTabViewItem NSTabViewItem - (void)addtabviewitem:(nstabviewitem *)tabviewitem; - (void)inserttabviewitem:(nstabviewitem *)tabviewitem atindex:(nsinteger)index; - (void)removetabviewitem:(nstabviewitem *)tabviewitem; - (NSTabViewItem *)tabviewitemforviewcontroller:(nsviewcontroller NSTabViewItem + (instancetype)tabviewitemwithviewcontroller:(nsviewcontroller *)vc;

85 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

86 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

87 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview; NSTabViewControllerTabStyleSegmentedControlOnTop NSTabViewControllerTabStyleSegmentedControlOnBottom NSTabViewControllerTabStyleToolbar NSTabViewControllerTabStyleUnspecified

88 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

89 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

90 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

91 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview; NSViewControllerTransitionNone NSViewControllerTransitionCrossfade NSViewControllerTransitionSlideUp NSViewControllerTransitionSlideDown NSViewControllerTransitionSlideLeft NSViewControllerTransitionSlideRight NSViewControllerTransitionSlideForward NSViewControllerTransitionSlideBackward

92 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

93 NSTabViewController NSTabViewControllerTabStyle (strong) NSSegmentedControl NSViewControllerTransitionOptions (strong) NSTabView *tabview;

94 NSTabViewController NSToolbarDelegate - (NSToolbarItem *)toolbar:(nstoolbar *)tb itemforitemidentifier:(nsstring *)itemidentifier willbeinsertedintotoolbar:(bool)flag NS_REQUIRES_SUPER; - (NSArray *)toolbardefaultitemidentifiers:(nstoolbar *)tb NS_REQUIRES_SUPER; - (NSArray *)toolbaralloweditemidentifiers:(nstoolbar *)tb NS_REQUIRES_SUPER; - (NSArray *)toolbarselectableitemidentifiers:(nstoolbar *)tb NS_REQUIRES_SUPER;

95 NSTabViewController NSToolbarDelegate - (NSToolbarItem *)toolbar:(nstoolbar *)tb itemforitemidentifier:(nsstring *)itemidentifier willbeinsertedintotoolbar:(bool)flag NS_REQUIRES_SUPER; - (NSArray *)toolbardefaultitemidentifiers:(nstoolbar *)tb NS_REQUIRES_SUPER; - (NSArray *)toolbaralloweditemidentifiers:(nstoolbar *)tb NS_REQUIRES_SUPER; - (NSArray *)toolbarselectableitemidentifiers:(nstoolbar *)tb NS_REQUIRES_SUPER;

96 NSSplitViewController

97 NSSplitViewController Manages an NSSplitView

98 NSSplitViewController Manages an NSSplitView Lazy loading of views

99 NSSplitViewController Manages an NSSplitView Lazy loading of views Requires Auto Layout

100 NSSplitViewController Containment NSSplitView view view

101 NSSplitViewController Containment NSSplitView view view

102 NSSplitViewController Containment NSSplitViewController NSSplitView NSSplitViewItem NSSplitViewItem NSViewController NSViewController view view

103 NSSplitViewController Containment Properties of NSSplitViewItem NSSplitViewController NSSplitView NSSplitViewItem NSSplitViewItem NSViewController (getter=iscollapsed) BOOL BOOL NSLayoutPriority (strong) NSViewController *viewcontroller; view view + (instancetype)splitviewitemwithviewcontroller:(nsviewcontroller *)vc;

104 NSSplitViewController Containment Properties of NSSplitViewItem NSSplitViewController NSSplitView NSSplitViewItem NSSplitViewItem NSViewController (getter=iscollapsed) BOOL collapsed; view BOOL cancollapse; [[splitviewitem animator] NSLayoutPriority (strong) NSViewController *viewcontroller; + (instancetype)splitviewitemwithviewcontroller:(nsviewcontroller *)vc;

105 NSSplitViewController (copy) NSArray *splitviewitems; NSSplitViewItem NSSplitViewItem - (void)addsplitviewitem:(nssplitviewitem *)splitviewitem; - (void)insertsplitviewitem:(nssplitviewitem *)splitviewitem atindex:(nsinteger)index; - (void)removesplitviewitem:(nssplitviewitem *)splitviewitem; - (NSSplitViewItem *)splitviewitemforviewcontroller:(nsviewcontroller *)vc;

106 NSSplitViewController (copy) NSArray *splitviewitems; NSSplitViewItem NSSplitViewItem - (void)addsplitviewitem:(nssplitviewitem *)splitviewitem; - (void)insertsplitviewitem:(nssplitviewitem *)splitviewitem atindex:(nsinteger)index; - (void)removesplitviewitem:(nssplitviewitem *)splitviewitem; - (NSSplitViewItem *)splitviewitemforviewcontroller:(nsviewcontroller *)vc;

107 NSSplitViewController (copy) NSArray *splitviewitems; NSSplitViewItem NSSplitViewItem - (void)addsplitviewitem:(nssplitviewitem *)splitviewitem; - (void)insertsplitviewitem:(nssplitviewitem *)splitviewitem atindex:(nsinteger)index; - (void)removesplitviewitem:(nssplitviewitem *)splitviewitem; - (NSSplitViewItem *)splitviewitemforviewcontroller:(nsviewcontroller *)vc;

108 NSSplitViewController (copy) NSArray *splitviewitems; NSSplitViewItem NSSplitViewItem - (void)addsplitviewitem:(nssplitviewitem *)splitviewitem; - (void)insertsplitviewitem:(nssplitviewitem *)splitviewitem atindex:(nsinteger)index; - (void)removesplitviewitem:(nssplitviewitem *)splitviewitem; - (NSSplitViewItem *)splitviewitemforviewcontroller:(nsviewcontroller *)vc;

109 NSViewController Containment MyCollectionViewController NSViewController MyCollectionItem MyCollectionItem NSTabViewController NSViewController NSViewController NSSplitViewController view view

110 NSViewController (copy) NSArray *childviewcontrollers; - (void)addchildviewcontroller:(nsviewcontroller *)childviewcontroller; - (void)insertchildviewcontroller:(nsviewcontroller *)childviewcontroller atindex:(nsinteger)index; - (readonly) NSViewController *parentviewcontroller; - (void)removefromparentviewcontroller; NSViewController NSViewController NSViewController NSViewController

111 NSViewController (copy) NSArray *childviewcontrollers; - (void)addchildviewcontroller:(nsviewcontroller *)childviewcontroller; - (void)insertchildviewcontroller:(nsviewcontroller *)childviewcontroller atindex:(nsinteger)index; - (readonly) NSViewController *parentviewcontroller; - (void)removefromparentviewcontroller; NSViewController NSViewController NSViewController NSViewController

112 NSViewController (copy) NSArray *childviewcontrollers; - (void)addchildviewcontroller:(nsviewcontroller *)childviewcontroller; - (void)insertchildviewcontroller:(nsviewcontroller *)childviewcontroller atindex:(nsinteger)index; - (readonly) NSViewController *parentviewcontroller; - (void)removefromparentviewcontroller; NSViewController NSViewController NSViewController NSViewController

113 NSViewController (copy) NSArray *childviewcontrollers; - (void)addchildviewcontroller:(nsviewcontroller *)childviewcontroller; - (void)insertchildviewcontroller:(nsviewcontroller *)childviewcontroller atindex:(nsinteger)index; - (readonly) NSViewController *parentviewcontroller; - (void)removefromparentviewcontroller; NSViewController NSViewController NSViewController NSViewController

114 NSViewController Containment - (void)transitionfromviewcontroller:(nsviewcontroller *)fromviewcontroller toviewcontroller:(nsviewcontroller *)toviewcontroller options:(nsviewcontrollertransitionoptions)options completionhandler:(void (^)(void))completion;

115 NSViewController Containment - (void)transitionfromviewcontroller:(nsviewcontroller *)fromviewcontroller toviewcontroller:(nsviewcontroller *)toviewcontroller options:(nsviewcontrollertransitionoptions)options completionhandler:(void (^)(void))completion; NSViewControllerTransitionNone NSViewControllerTransitionCrossfade NSViewControllerTransitionSlideUp NSViewControllerTransitionSlideDown NSViewControllerTransitionSlideLeft NSViewControllerTransitionSlideRight NSViewControllerTransitionSlideForward NSViewControllerTransitionSlideBackward

116 NSViewController Containment - (void)transitionfromviewcontroller:(nsviewcontroller *)fromviewcontroller toviewcontroller:(nsviewcontroller *)toviewcontroller options:(nsviewcontrollertransitionoptions)options completionhandler:(void (^)(void))completion;

117 NSViewController Containment MyCollectionViewController NSViewController MyCollectionItem MyCollectionItem NSTabViewController NSViewController NSViewController NSSplitViewController view view

118 NSViewController Loading and layout Containers Triggered segues Manual presentation

119 NSViewController Triggered segues Presentation

120 NSViewController Triggered segues Presentation Identifier

121 NSViewController Triggered segues Presentation Identifier Source view controller

122 NSViewController Triggered segues Presentation Identifier Source view controller Destination controller

123 NSViewController Triggered segues Presentation Identifier Source view controller Destination controller Style

124 NSViewController Triggered segues Presentation Identifier Source view controller Destination controller Style Other attributes

125 NSViewController Triggered segues - (void)prepareforsegue:(nsstoryboardsegue *)segue sender:(id)sender;

126 NSViewController Triggered segues - (void)prepareforsegue:(nsstoryboardsegue *)segue (readonly, copy) NSString (readonly, strong) id (readonly, strong) id destinationcontroller;

127 NSViewController Triggered segues - (void)prepareforsegue:(nsstoryboardsegue *)segue sender:(id)sender; - (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender;

128 NSViewController Triggered segues - (void)prepareforsegue:(nsstoryboardsegue *)segue sender:(id)sender; - (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender; - (void)performseguewithidentifier:(nsstring *)identifier sender:(id)sender;

129 NSViewController Triggered segues

130 NSViewController Triggered segues - (void)prepareforsegue:(nsstoryboardsegue *)segue sender:(id)sender;

131 NSViewController Manual presentation

132 NSViewController Manual presentation - (void)presentviewcontrollerassheet:(nsviewcontroller *)vc; - (void)presentviewcontrollerasmodalwindow:(nsviewcontroller *)vc; - (void)presentviewcontroller:(nsviewcontroller *)vc aspopoverrelativetorect:(nsrect)positioningrect ofview:(nsview *)positioningview preferrededge:(nsrectedge)preferrededge behavior:(nspopoverbehavior)behavior; - (IBAction)dismissController:(id)sender;

133 NSViewController Manual presentation - (void)presentviewcontrollerassheet:(nsviewcontroller *)vc; - (void)presentviewcontrollerasmodalwindow:(nsviewcontroller *)vc; - (void)presentviewcontroller:(nsviewcontroller *)vc aspopoverrelativetorect:(nsrect)positioningrect ofview:(nsview *)positioningview preferrededge:(nsrectedge)preferrededge behavior:(nspopoverbehavior)behavior; - (IBAction)dismissController:(id)sender;

134 NSViewController Manual presentation - (void)presentviewcontrollerassheet:(nsviewcontroller *)vc; - (void)presentviewcontrollerasmodalwindow:(nsviewcontroller *)vc; - (void)presentviewcontroller:(nsviewcontroller *)vc aspopoverrelativetorect:(nsrect)positioningrect ofview:(nsview *)positioningview preferrededge:(nsrectedge)preferrededge behavior:(nspopoverbehavior)behavior; - (IBAction)dismissController:(id)sender;

135 NSViewController Manual presentation - (void)presentviewcontrollerassheet:(nsviewcontroller *)vc; - (void)presentviewcontrollerasmodalwindow:(nsviewcontroller *)vc; - (void)presentviewcontroller:(nsviewcontroller *)vc aspopoverrelativetorect:(nsrect)positioningrect ofview:(nsview *)positioningview preferrededge:(nsrectedge)preferrededge behavior:(nspopoverbehavior)behavior; - (IBAction)dismissController:(id)sender;

136 NSViewController Manual presentation - (void)presentviewcontrollerassheet:(nsviewcontroller *)vc; - (void)presentviewcontrollerasmodalwindow:(nsviewcontroller *)vc; - (void)presentviewcontroller:(nsviewcontroller *)vc aspopoverrelativetorect:(nsrect)positioningrect ofview:(nsview *)positioningview preferrededge:(nsrectedge)preferrededge behavior:(nspopoverbehavior)behavior; - (IBAction)dismissController:(id)sender;

137 NSViewController Manual presentation - (void)presentviewcontroller:(nsviewcontroller *)viewcontroller animator:(id <NSViewControllerPresentationAnimator>)animator;

138 NSViewController Manual presentation - (void)presentviewcontroller:(nsviewcontroller *)viewcontroller animator:(id <NSViewControllerPresentationAnimator>)animator;

139 NSViewController Manual presentation - (void)presentviewcontroller:(nsviewcontroller *)viewcontroller animator:(id - (void)animatepresentationofviewcontroller:(nsviewcontroller *)vc fromviewcontroller:(nsviewcontroller *)fromviewcontroller; - (void)animatedismissalofviewcontroller:(nsviewcontroller *)vc fromviewcontroller:(nsviewcontroller *)fromviewcontroller;

140 API Looking under the hood Storyboards View controllers Window controllers Gesture recognizers

141 NSWindowController

142 (strong) NSViewController strong) NSStoryboard *storyboard; - (IBAction)dismissController:(id)sender;

143 (strong) NSViewController strong) NSStoryboard *storyboard; - (IBAction)dismissController:(id)sender;

144 (strong) NSViewController strong) NSStoryboard *storyboard; - (IBAction)dismissController:(id)sender;

145 (strong) NSViewController strong) NSStoryboard *storyboard; - (IBAction)dismissController:(id)sender;

146 (strong) NSViewController strong) NSStoryboard *storyboard; - (IBAction)dismissController:(id)sender; - (void)prepareforsegue:(nsstoryboardsegue *)segue sender:(id)sender; - (void)performseguewithidentifier:(nsstring *)identifier sender:(id)sender; - (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender;

147 NSWindowController Manage window

148 NSWindowController Manage window Manage titlebar and toolbar

149 NSWindowController Manage window Manage titlebar and toolbar Manage the contentviewcontroller

150 API Looking under the hood Storyboards View controllers Window controllers Gesture recognizers

151 NSGestureRecognizer

152 NSGestureRecognizer Most gestures are determined by hardware (but not all)

153 NSGestureRecognizer Most gestures are determined by hardware (but not all) Disambiguating user input

154 NSGestureRecognizer - (void)mousedown:(nsevent *)downevent { CGFloat doubleclicktime = [NSEvent doubleclickinterval]; NSEventMask eventmask = NSLeftMouseDraggedMask NSLeftMouseUpMask; // Is this a singe, double or triple click? Or long click, or a drag? NSEvent *nextevent = [NSApp nexteventmatchingmask:eventmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]; if (nextevent) { Most gestures are determined by hardware (but not all) // could be an up or a drag if (nextevent.type == NSLeftMouseUp) { // got at least a single click, make sure it's not performing a double click if ( (nextevent = [NSApp nexteventmatchingmask:nsleftmousedownmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { // start of a double (or triple) click Disambiguating user input if ( (nextevent = [NSApp nexteventmatchingmask:eventmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { } if (nextevent.type == NSLeftMouseUp) { // got at least a double click, make sure user is not performing a triple click if ( (nextevent = [NSApp nexteventmatchingmask:nsleftmousedownmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { // start of a triple click? if ( (nextevent = [NSApp nexteventmatchingmask:eventmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { if (nextevent.type == NSLeftMouseUp) { // triple click This is as far as we care about [self handletripleclick]; } else { // double click and drag. That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // double click and a half. That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // double click [self handledoubleclick]; } } else { // tap and a drag, That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // tap and a half. That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // This is a single click. This view doesn't care about single clicks, but perhaps the superview cares. [NSApp postevent:nextevent atstart:yes]; [super mousedown:downevent]; } } else { [NSApp postevent:nextevent atstart:yes]; [self handlemousedragwithevent:downevent]; } } else { // a long single click [self handlelongclick]; // eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; }

155 NSGestureRecognizer - (void)mousedown:(nsevent *)downevent { CGFloat doubleclicktime = [NSEvent doubleclickinterval]; NSEventMask eventmask = NSLeftMouseDraggedMask NSLeftMouseUpMask; // Is this a singe, double or triple click? Or long click, or a drag? NSEvent *nextevent = [NSApp nexteventmatchingmask:eventmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]; if (nextevent) { Most gestures are determined by hardware (but not all) // could be an up or a drag if (nextevent.type == NSLeftMouseUp) { // got at least a single click, make sure it's not performing a double click if ( (nextevent = [NSApp nexteventmatchingmask:nsleftmousedownmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { // start of a double (or triple) click Disambiguating user input if ( (nextevent = [NSApp nexteventmatchingmask:eventmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { } if (nextevent.type == NSLeftMouseUp) { // got at least a double click, make sure user is not performing a triple click if ( (nextevent = [NSApp nexteventmatchingmask:nsleftmousedownmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { // start of a triple click? if ( (nextevent = [NSApp nexteventmatchingmask:eventmask untildate:[nsdate datewithtimeintervalsincenow:doubleclicktime] inmode:nseventtrackingrunloopmode dequeue:yes]) ) { if (nextevent.type == NSLeftMouseUp) { // triple click This is as far as we care about [self handletripleclick]; } else { // double click and drag. That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // double click and a half. That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // double click [self handledoubleclick]; } } else { // tap and a drag, That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // tap and a half. That means nothing to us. Eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; } } else { // This is a single click. This view doesn't care about single clicks, but perhaps the superview cares. [NSApp postevent:nextevent atstart:yes]; [super mousedown:downevent]; } } else { [NSApp postevent:nextevent atstart:yes]; [self handlemousedragwithevent:downevent]; } } else { // a long single click [self handlelongclick]; // eat all events until we get a mouse up nextevent = [NSApp nexteventmatchingmask:nsleftmouseup untildate:nil inmode:nseventtrackingrunloopmode dequeue:yes]; [NSApp discardeventsmatchingmask:nsanyeventmask beforeevent:nextevent]; }

156 NSGestureRecognizer Most gestures are determined by hardware (but not all) Disambiguating user input

157 NSGestureRecognizer Most gestures are determined by hardware (but not all) Disambiguating user input Good fit for view controllers (target of action)

158 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

159 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

160 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

161 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

162 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

163 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

164 NSGestureRecognizer NSGestureRecognizer *gr = [[NSMagnificationGestureRecognizer alloc] initwithtarget:self action:@selector(magnify:)]; [self.view addgesturerecognizer:gr]; gr.delegate = self; - (void)magnify:(nsclickgesturerecognizer*)gr { switch (gr.state) { case NSGestureRecognizerStateBegan: case NSGestureRecognizerStateChanged: case NSGestureRecognizerStateEnded: case NSGestureRecognizerStateCancelled: } }

165 NSGestureRecognizer NSClickGestureRecognizer NSPanGestureRecognizer NSPressGestureRecognizer NSMagnificationGestureRecognizer NSRotationGestureRecognizer

166 NSGestureRecognizer NSClickGestureRecognizer NSPanGestureRecognizer NSPressGestureRecognizer NSMagnificationGestureRecognizer NSRotationGestureRecognizer

167 NSGestureRecognizer NSClickGestureRecognizer NSPanGestureRecognizer NSPressGestureRecognizer NSMagnificationGestureRecognizer NSRotationGestureRecognizer

168 NSGestureRecognizer NSClickGestureRecognizer NSPanGestureRecognizer NSPressGestureRecognizer NSMagnificationGestureRecognizer NSRotationGestureRecognizer

169 NSGestureRecognizer NSClickGestureRecognizer NSPanGestureRecognizer NSPressGestureRecognizer NSMagnificationGestureRecognizer NSRotationGestureRecognizer

170 NSGestureRecognizer Event flow Mouse press NSApplication -sendevent: NSWindow -sendevent: NSView -mousedown: Event Observers Responder Chain

171 NSGestureRecognizer Event flow Mouse press NSApplication -sendevent: NSWindow -sendevent: NSView -mousedown: Event Observers Gesture Recognizers Responder Chain

172 NSGestureRecognizer For subclassers See NSGestureRecognizer (NSSubclassUse)

173 Demo View controllers and gesture recognizers Raleigh Ledet AppKit Engineer

174 Summary Looking under the hood Storyboards View controllers Window controllers Gesture recognizers

175 More Information Jake Behrens App Frameworks Evangelist Documentation What s New in OS X Apple Developer Forums

176 Related Sessions Adapting Your App to the New UI of OS X Yosemite Pacific Heights Tuesday 3:15PM Adopting Advanced Features of the New UI of OS X Yosemite Marina Wednesday 2:00PM What's New in Interface Builder Mission Wednesday 3:15PM Creating Modern Cocoa Apps Marina Thursday 10:15AM

177 Labs Interface Builder and Live Views Lab Tools Lab C Wednesday 9:00AM New UI and Cocoa Lab Frameworks Lab B Wednesday 3:15PM Xcode and Interface Builder Lab Tools Lab C Thursday 9:00AM View Controllers and Cocoa Lab Frameworks Lab B Thursday 11:30AM Cocoa Lab Frameworks Lab B Thursday 4:30PM Interface Builder and Auto Layout Lab Tools Lab C Friday 9:00AM

178

What s New in Cocoa #WWDC14. Frameworks. Session 204 Ali Ozer Director of Cocoa Frameworks

What s New in Cocoa #WWDC14. Frameworks. Session 204 Ali Ozer Director of Cocoa Frameworks Frameworks #WWDC14 What s New in Cocoa Session 204 Ali Ozer Director of Cocoa Frameworks 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Adopting Advanced Features of the New UI

Adopting Advanced Features of the New UI Frameworks #WWDC14 Adopting Advanced Features of the New UI Session 220 Chris Dreessen AppKit Software Engineer! Corbin Dunn AppKit Software Engineer 2014 Apple Inc. All rights reserved. Redistribution

More information

Accessibility on OS X

Accessibility on OS X Frameworks #WWDC14 Accessibility on OS X New Accessibility API Session 207 Patti Hoa Accessibility Engineer! Chris Dolan Accessibility Engineer 2014 Apple Inc. All rights reserved. Redistribution or public

More information

Adapting to the New UI of OS X Yosemite

Adapting to the New UI of OS X Yosemite Frameworks #WWDC14 Adapting to the New UI of OS X Yosemite Session 209 Mike Stern User Experience Evangelist! Rachel Goldeen Cocoa Software Engineer! Patrick Heynen Cocoa Engineering Manager 2014 Apple

More information

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility Frameworks #WWDC14 Accessibility on ios Developing for everyone Session 210 Clare Kasemset ios Accessibility 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

User Interfaces. Lecture 19. Cocoa: Mouse and Keyboard Events. Hamza Bennani September 18, 2018

User Interfaces. Lecture 19. Cocoa: Mouse and Keyboard Events. Hamza Bennani September 18, 2018 User Interfaces Lecture 19 Cocoa: Mouse and Keyboard Events Hamza Bennani hamza@hamzabennani.com September 18, 2018 Last Lecture Where did we stop? 1 Events Events get filtered into a queue by MacOS X

More information

Touch Bar Fundamentals

Touch Bar Fundamentals Session App Frameworks #WWDC17 Touch Bar Fundamentals 211 Chris Dreessen John Tegtmeyer 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer Featured #WWDC15 Building Watch Apps Session 108 Neil Desai watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda

More information

Cross Platform Nearby Networking

Cross Platform Nearby Networking Core OS #WWDC14 Cross Platform Nearby Networking Session 709 Demijan Klinc Software Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

What s New in Xcode App Signing

What s New in Xcode App Signing Developer Tools #WWDC16 What s New in Xcode App Signing Developing and distributing Session 401 Joshua Pennington Tools Engineering Manager Itai Rom Tools Engineer 2016 Apple Inc. All rights reserved.

More information

Introducing the Modern WebKit API

Introducing the Modern WebKit API Frameworks #WWDC14 Introducing the Modern WebKit API Session 206 Anders Carlsson Safari and WebKit Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011 Developing Applications for ios Today UI Element of the Week UIToolbar ipad Split View Popover Universal (iphone + ipad) Application Demo Friday Section AVFoundation framework - Capturing and manipulating

More information

Implementing UI Designs in Interface Builder

Implementing UI Designs in Interface Builder Developer Tools #WWDC15 Implementing UI Designs in Interface Builder Session 407 Kevin Cathey Interface Builder Engineer Tony Ricciardi Interface Builder Engineer 2015 Apple Inc. All rights reserved. Redistribution

More information

New UIKit Support for International User Interfaces

New UIKit Support for International User Interfaces App Frameworks #WWDC15 New UIKit Support for International User Interfaces Session 222 Sara Radi Internationalization Software Engineer Aaltan Ahmad Internationalization Software Engineer Paul Borokhov

More information

What s New in NSCollectionView Session 225

What s New in NSCollectionView Session 225 App Frameworks #WWDC15 What s New in NSCollectionView Session 225 Troy Stephens Application Frameworks Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Modern User Interaction on ios

Modern User Interaction on ios App Frameworks #WWDC17 Modern User Interaction on ios Mastering the UIKit UIGesture System Session 219 Dominik Wagner, UIKit Engineer Michael Turner, UIKit Engineer Glen Low, UIKit Engineer 2017 Apple

More information

Creating Extensions for ios and OS X, Part Two

Creating Extensions for ios and OS X, Part Two Frameworks #WWDC14 Creating Extensions for ios and OS X, Part Two Architecture Session 217 Damien Sorresso Overloaded Operator 2014 Apple Inc. All rights reserved. Redistribution or public display not

More information

ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout

ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout Overview : Today s Lecture Model View Controller Design Pattern Creating Views in Storyboard Connecting your Views to Code Auto

More information

CS193E Lecture 11. Copy/Paste & Pasteboards Scrolling Printing

CS193E Lecture 11. Copy/Paste & Pasteboards Scrolling Printing CS193E Lecture 11 Copy/Paste & Pasteboards Scrolling Printing Agenda Questions on previous material or assignment? Start thinking about final projects! Demo PersonalTimeline 2.5 Copy and Paste Scrolling

More information

View Controller Lifecycle

View Controller Lifecycle View Controller Lifecycle View Controllers have a Lifecycle A sequence of messages is sent to them as they progress through it Why does this matter? You very commonly override these methods to do certain

More information

Seamless Linking to Your App

Seamless Linking to Your App App Frameworks #WWDC15 Seamless Linking to Your App Session 509 Conrad Shultz Safari and WebKit Software Engineer Jonathan Grynspan Core Services Software Engineer 2015 Apple Inc. All rights reserved.

More information

Advanced Debugging and the Address Sanitizer

Advanced Debugging and the Address Sanitizer Developer Tools #WWDC15 Advanced Debugging and the Address Sanitizer Finding your undocumented features Session 413 Mike Swingler Xcode UI Infrastructure Anna Zaks LLVM Program Analysis 2015 Apple Inc.

More information

Mobile Application Development

Mobile Application Development Mobile Application Development Lecture 16 Controllers of View Controllers 2013/2014 Parma Università degli Studi di Parma Lecture Summary Multiple MVCs UINavigationController Segues UITabBarController

More information

Using and Extending the Xcode Source Editor

Using and Extending the Xcode Source Editor Developer Tools #WWDC16 Using and Extending the Xcode Source Editor Session 414 Mike Swingler Xcode Infrastructure and Editors Chris Hanson Xcode Infrastructure and Editors 2016 Apple Inc. All rights reserved.

More information

View Controller Advancements for ios8

View Controller Advancements for ios8 Frameworks #WWDC14 View Controller Advancements for ios8 Session 214 Bruce D. Nilo Manager, UIKit Fundamentals 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

What's New in UIKit Dynamics and Visual Effects Session 229

What's New in UIKit Dynamics and Visual Effects Session 229 App Frameworks #WWDC15 What's New in UIKit Dynamics and Visual Effects Session 229 Michael Turner UIKit Engineer David Duncan UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public

More information

Mastering UIKit on tvos

Mastering UIKit on tvos App Frameworks #WWDC16 Mastering UIKit on tvos Session 210 Justin Voss UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Advanced Scrollviews and Touch Handling Techniques

Advanced Scrollviews and Touch Handling Techniques Frameworks #WWDC14 Advanced Scrollviews and Touch Handling Techniques Session 235 Josh Shaffer ios Apps and Frameworks Engineer Eliza Block ios Apps and Frameworks Engineer 2014 Apple Inc. All rights reserved.

More information

User Interfaces. Lecture 16. Model - View - Controller. Hamza Bennani September 6, 2018

User Interfaces. Lecture 16. Model - View - Controller. Hamza Bennani September 6, 2018 User Interfaces Lecture 16 Model - View - Controller Hamza Bennani hamza@hamzabennani.com September 6, 2018 Last Lecture Summary Default Cocoa application. NSApplication NSApplicationDelegate XIB/NIB-file

More information

Extending Your Apps with SiriKit

Extending Your Apps with SiriKit App Frameworks #WWDC16 Extending Your Apps with SiriKit Session 225 Vineet Khosla SiriKit Engineering Diana Huang SiriKit Engineering Scott Andrus SiriKit Engineering 2016 Apple Inc. All rights reserved.

More information

Improving the Accessibility and Usability of Complex Web Applications

Improving the Accessibility and Usability of Complex Web Applications Media #WWDC14 Improving the Accessibility and Usability of Complex Web Applications Session 516 Jesse Bunch Productivity Engineering 2014 Apple Inc. All rights reserved. Redistribution or public display

More information

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani email: simone.cirani@unipr.it http://www.tlc.unipr.it/cirani Corso IFTS Cisita ios Development 2014 Parma Università degli Studi

More information

What s New in CloudKit

What s New in CloudKit System Frameworks #WWDC15 What s New in CloudKit Session 704 Olivier Bonnet icloud Client Eric Krugler icloud Server 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer App Frameworks #WWDC16 What s New in tvos Session 206 Hans Kim tvos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Welcome

More information

ios 101 Hands-On Challenges

ios 101 Hands-On Challenges ios 101 Hands-On Challenges Copyright 2014 Razeware LLC. All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by

More information

Creating Content with iad JS

Creating Content with iad JS Creating Content with iad JS Part 2 The iad JS Framework Antoine Quint iad JS Software Engineer ios Apps and Frameworks 2 Agenda Motivations and Features of iad JS Core JavaScript Enhancements Working

More information

WatchKit In-Depth, Part 2

WatchKit In-Depth, Part 2 App Frameworks #WWDC15 WatchKit In-Depth, Part 2 Session 208 Nathan de Vries watchos Engineer Chloe Chang watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Announcements. Today s Topics

Announcements. Today s Topics Announcements Lab 2 is due tonight Lab 3 is posted Due next Wednesday Sept 30 th 1 Extensible - CSE 436 Software Networking Engineering Platform Workshop 1 Today s Topics Designing iphone Applica;ons Model-

More information

Mysteries of Auto Layout, Part 1

Mysteries of Auto Layout, Part 1 App Frameworks #WWDC15 Mysteries of Auto Layout, Part 1 Session 218 Jason Yao Interface Builder Engineer Kasia Wawer ios Keyboards Engineer 2015 Apple Inc. All rights reserved. Redistribution or public

More information

Enhancing your apps for the next dimension of touch

Enhancing your apps for the next dimension of touch App Frameworks #WWDC16 A Peek at 3D Touch Enhancing your apps for the next dimension of touch Session 228 Tyler Fox UIKit Frameworks Engineer Peter Hajas UIKit Frameworks Engineer 2016 Apple Inc. All rights

More information

Mastering Xcode for iphone OS Development Part 2. Marc Verstaen Sr. Manager, iphone Tools

Mastering Xcode for iphone OS Development Part 2. Marc Verstaen Sr. Manager, iphone Tools Mastering Xcode for iphone OS Development Part 2 Marc Verstaen Sr. Manager, iphone Tools 2 Tale of Two Sessions Part 1: Orientation: Tour of complete development cycle Part 2: Mastery: Details of several

More information

Quick Interaction Techniques for watchos

Quick Interaction Techniques for watchos App Frameworks #WWDC16 Quick Interaction Techniques for watchos Session 211 Tom Witkin watchos Engineer Miguel Sanchez watchos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

Address Book for iphone

Address Book for iphone Address Book for iphone The people s framework Alexandre Aybes iphone Software Engineer 2 3 Address Book for iphone The people s framework Alexandre Aybes iphone Software Engineer 4 What We Will Cover

More information

Getting the Most out of Playgrounds in Xcode

Getting the Most out of Playgrounds in Xcode #WWDC18 Getting the Most out of Playgrounds in Xcode Session 402 Tibet Rooney-Rabdau, Xcode Engineer Alex Brown, Core OS Engineer TJ Usiyan, Xcode Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

ios Application Development Course Details

ios Application Development Course Details ios Application Development Course Details By Besant Technologies Course Name Category Venue ios Application Development Mobile Application Development Besant Technologies No.24, Nagendra Nagar, Velachery

More information

CS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding

CS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding CS193E Lecture 7 Document-based Applications NSTableView Key-Value Coding Agenda Questions? Review: delegates, MVC Document-based apps Table views Key Value Coding Model, View, Controller Controller Model

More information

Designing Great Apple Watch Experiences

Designing Great Apple Watch Experiences Design #WWDC16 Designing Great Apple Watch Experiences Session 804 Mike Stern User Experience Evangelist 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Apple Watch Design Tips and Tricks

Apple Watch Design Tips and Tricks Design #WWDC15 Apple Watch Design Tips and Tricks Session 805 Mike Stern User Experience Evangelist Rachel Roth User Experience Evangelist 2015 Apple Inc. All rights reserved. Redistribution or public

More information

Introducing the Photos Frameworks

Introducing the Photos Frameworks Media #WWDC14 Introducing the Photos Frameworks Session 511 Adam Swift ios Photos Frameworks 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Mastering Xcode for iphone OS Development Part 1. Todd Fernandez Sr. Manager, IDEs

Mastering Xcode for iphone OS Development Part 1. Todd Fernandez Sr. Manager, IDEs Mastering Xcode for iphone OS Development Part 1 Todd Fernandez Sr. Manager, IDEs 2 3 Customer Reviews Write a Review Current Version (1) All Versions (24) Gorgeous and Addictive Report a Concern by Play

More information

Creating Complications with ClockKit Session 209

Creating Complications with ClockKit Session 209 App Frameworks #WWDC15 Creating Complications with ClockKit Session 209 Eliza Block watchos Engineer Paul Salzman watchos Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display

More information

Localizing with Xcode 6

Localizing with Xcode 6 Tools #WWDC14 Localizing with Xcode 6 Best practices and new workflows Session 412 Zoltan Foley-Fisher Xcode Software Engineer! Chris Hanson Xcode Software Engineer 2014 Apple Inc. All rights reserved.

More information

What s New in Cocoa for macos

What s New in Cocoa for macos Session #WWDC18 What s New in Cocoa for macos 209 Ali Ozer, Cocoa Frameworks Chris Dreessen, Cocoa Frameworks Jesse Donaldson, Cocoa Frameworks 2018 Apple Inc. All rights reserved. Redistribution or public

More information

Creating Great App Previews

Creating Great App Previews Services #WWDC14 Creating Great App Previews Session 304 Paul Turner Sr. Operations Manager itunes Digital Supply Chain Engineering 2014 Apple Inc. All rights reserved. Redistribution or public display

More information

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility App Frameworks #WWDC15 ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

Advanced Cocoa Text Tips and Tricks. Aki Inoue Cocoa Engineer

Advanced Cocoa Text Tips and Tricks. Aki Inoue Cocoa Engineer Advanced Cocoa Text Tips and Tricks Aki Inoue Cocoa Engineer 2 Introduction Only on Mac OS Diving deeper Understanding the layout process Getting comfortable with extending and customizing base functionalities

More information

Designing iphone Applications

Designing iphone Applications Designing iphone Applications 4 Two Flavors of Mail 5 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content Focus on your user s data 6 Organizing Content

More information

Monetize and Promote Your App with iad

Monetize and Promote Your App with iad Media #WWDC15 Monetize and Promote Your App with iad From design to launch Session 503 Carol Teng Shashank Phadke 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Introducing On Demand Resources

Introducing On Demand Resources App Frameworks #WWDC15 Introducing On Demand Resources An element of App Thinning Session 214 Steve Lewallen Frameworks Engineering Tony Parker Cocoa Frameworks 2015 Apple Inc. All rights reserved. Redistribution

More information

MVC & Onwards. CS 442: Mobile App Development Michael Saelee

MVC & Onwards. CS 442: Mobile App Development Michael Saelee MVC & Onwards CS 442: Mobile App Development Michael Saelee Agenda - Recap: view-controller communication - Delegation as a general pattern - Observer pattern - Controller responsibilities & MVC - Multiple

More information

User Interfaces. Lecture 15. Application Programming on Mac OS. Hamza Bennani September 4, 2018

User Interfaces. Lecture 15. Application Programming on Mac OS. Hamza Bennani September 4, 2018 User Interfaces Lecture 15 Application Programming on Mac OS Hamza Bennani hamza@hamzabennani.com September 4, 2018 Logistics Office hours: Tue/Thu, 2pm to 3pm. Office: 250 Geoff Wyvill. Acknowledgment:

More information

Building Apps with Dynamic Type

Building Apps with Dynamic Type Session App Frameworks #WWDC17 Building Apps with Dynamic Type 245 Clare Kasemset, Software Engineering Manager Nandini Sundar, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or

More information

ITP 342 Mobile App Dev. Connections

ITP 342 Mobile App Dev. Connections ITP 342 Mobile App Dev Connections User Interface Interactions First project displayed information to the user, but there was no interaction. We want the users of our app to touch UI components such as

More information

Thread Sanitizer and Static Analysis

Thread Sanitizer and Static Analysis Developer Tools #WWDC16 Thread Sanitizer and Static Analysis Help with finding bugs in your code Session 412 Anna Zaks Manager, Program Analysis Team Devin Coughlin Engineer, Program Analysis Team 2016

More information

HKUST. CSIT 6910A Report. iband - Musical Instrument App on Mobile Devices. Student: QIAN Li. Supervisor: Prof. David Rossiter

HKUST. CSIT 6910A Report. iband - Musical Instrument App on Mobile Devices. Student: QIAN Li. Supervisor: Prof. David Rossiter HKUST CSIT 6910A Report Student: Supervisor: Prof. David Rossiter Table of Contents I. Introduction 1 1.1 Overview 1 1.2 Objective 1 II. Preparation 2 2.1 ios SDK & Xcode IDE 2 2.2 Wireless LAN Network

More information

Leveraging Touch Input on ios

Leveraging Touch Input on ios App Frameworks #WWDC16 Leveraging Touch Input on ios And getting the most out of Apple Pencil Session 220 Dominik Wagner UIKit Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

Improving your Existing Apps with Swift

Improving your Existing Apps with Swift Developer Tools #WWDC15 Improving your Existing Apps with Swift Getting Swifty with It Session 403 Woody L. in the Sea of Swift 2015 Apple Inc. All rights reserved. Redistribution or public display not

More information

Creating Extensions for Safari

Creating Extensions for Safari Creating Extensions for Safari Part One Timothy Hatcher Safari and WebKit Engineer 2 3 HTML5 CSS3 JavaScript Native Code 4 Cross Platform Secure Crashes 5 What You ll Learn When to make a Safari Extension

More information

What s New in Metal, Part 2

What s New in Metal, Part 2 Graphics and Games #WWDC15 What s New in Metal, Part 2 Session 607 Dan Omachi GPU Software Frameworks Engineer Anna Tikhonova GPU Software Frameworks Engineer 2015 Apple Inc. All rights reserved. Redistribution

More information

Introducing the Contacts Framework

Introducing the Contacts Framework App Frameworks #WWDC15 Introducing the Contacts Framework For OS X, ios, and watchos Session 223 Bruce Stadnyk ios Contacts Engineer Dave Dribin OS X Contacts Engineer Julien Robert ios Contacts Engineer

More information

Designing for Apple Watch

Designing for Apple Watch Design #WWDC15 Designing for Apple Watch Session 802 Mike Stern User Experience Evangelist 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

X Review. Mac OS X Roots: NeXT. BWS Available for virtually every OS

X Review. Mac OS X Roots: NeXT. BWS Available for virtually every OS X Review Distributed window system Server is the user s Terminal Client runs the application WM Xlib Application Widget Set Xt Intrinsics Xlib Highly modular X Server (exchange WM, Widget Set) BWS Available

More information

What s New in Testing

What s New in Testing #WWDC18 What s New in Testing Session 403 Honza Dvorsky, Xcode Engineer Ethan Vaughan, Xcode Engineer 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

IOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib

IOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib IOS - TEXT FIELD http://www.tutorialspoint.com/ios/ios_ui_elements_text_field.htm Copyright tutorialspoint.com Use of Text Field A text field is a UI element that enables the app to get user input. A UITextfield

More information

Cocoa: Multiple windows COSC346

Cocoa: Multiple windows COSC346 Cocoa: Multiple s COSC346 Window controller The behaviour of each is controlled by an NSWindowController object To create a new, create a new class that extends (abstract) NSWindowController When creating

More information

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML System Frameworks #WWDC17 Core ML in Depth Krishna Sridhar, Core ML Zach Nation, Core ML 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

Mastering Drag and Drop

Mastering Drag and Drop Session App Frameworks #WWDC17 Mastering Drag and Drop 213 Tom Adriaenssen, UIKit Wenson Hsieh, WebKit Robb Böhnke, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

ITP 342 Mobile App Dev. Connections

ITP 342 Mobile App Dev. Connections ITP 342 Mobile App Dev Connections User Interface Interactions First project displayed information to the user, but there was no interaction. We want the users of our app to touch UI components such as

More information

lecture 10 UI/UX and Programmatic Design cs : spring 2018

lecture 10 UI/UX and Programmatic Design cs : spring 2018 lecture 10 UI/UX and Programmatic Design cs198-001 : spring 2018 1 Announcements custom app progress form due before lab (~1 minute) will be released after lecture only 2 labs left (both very important)

More information

CUSTOM VIEWS. The View Hierarchy. Chapter 12

CUSTOM VIEWS. The View Hierarchy. Chapter 12 Chapter 12 CUSTOM VIEWS A ll the visible objects in an application are either windows or views. In this chapter, you will create a subclass of NSView. From time to time, you will create a custom view to

More information

Manual Xcode Ios 5 Simulator Black Screen >>>CLICK HERE<<<

Manual Xcode Ios 5 Simulator Black Screen >>>CLICK HERE<<< Manual Xcode Ios 5 Simulator Black Screen Jayprakash Dubey Nov 12 '14 at 5:10 Only ios 7.0 and later simulators are supported on Xcode 6.0.x and 6.1.x. Xcode 6.0.1 - ios Simulator Black Screen. It either

More information

CS 371L - Mobile Computing (ios) Dr. William C. Bulko. CS 371L Mobile Computing (ios) Introduction

CS 371L - Mobile Computing (ios) Dr. William C. Bulko. CS 371L Mobile Computing (ios) Introduction CS 371L - Mobile Computing (ios) Dr. William C. Bulko CS 371L Mobile Computing (ios) Introduction 2014 The Evolution of Computing Mainframes Minicomputers - fridge-size PCs - desktop and deskside Laptops

More information

Cocoa Touch Best Practices

Cocoa Touch Best Practices App Frameworks #WWDC15 Cocoa Touch Best Practices Session 231 Luke Hiesterman UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Kevin van Vechten Core OS

Kevin van Vechten Core OS Kevin van Vechten Core OS 2 3 Bill Bumgarner 4 (lambda (a) (add a d)) 10 timesrepeat:[pen turn:d; draw] z.each { val puts(val + d.to_s)} repeat(10, ^{ putc('0'+ d); }); 5 6 7 8 ^ 9 [myset objectspassingtest:

More information

ios Mobile Development

ios Mobile Development ios Mobile Development Today UITableView! Data source-driven vertical list of views.! ipad! Device-specific UI idioms.! Demo! Shutterbug UITableView Very important class for displaying data in a table!

More information

Media and Gaming Accessibility

Media and Gaming Accessibility Session System Frameworks #WWDC17 Media and Gaming Accessibility 217 Greg Hughes, Software Engineering Manager Charlotte Hill, Software Engineer 2017 Apple Inc. All rights reserved. Redistribution or public

More information

What s New in imessage Apps

What s New in imessage Apps Session App Frameworks #WWDC17 What s New in imessage Apps 234 Eugene Bistolas, Messages Engineer Jay Chae, Messages Engineer Stephen Lottermoser, Messages Engineer 2017 Apple Inc. All rights reserved.

More information

Data Delivery with Drag and Drop

Data Delivery with Drag and Drop Session App Frameworks #WWDC17 Data Delivery with Drag and Drop 227 Dave Rahardja, UIKit Tanu Singhal, UIKit 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Advanced Memory Analysis with Instruments. Daniel Delwood Performance Tools Engineer

Advanced Memory Analysis with Instruments. Daniel Delwood Performance Tools Engineer Advanced Memory Analysis with Instruments Daniel Delwood Performance Tools Engineer 2 Memory Analysis What s the issue? Memory is critical to performance Limited resource Especially on iphone OS 3 4 Memory

More information

Developing Applications for ios

Developing Applications for ios Developing Applications for ios Lecture 7: View Controller Lifecycle and UIKit Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Content View Controller

More information

Structuring an App Copyright 2013 Apple Inc. All Rights Reserved.

Structuring an App Copyright 2013 Apple Inc. All Rights Reserved. Structuring an App App Development Process (page 30) Designing a User Interface (page 36) Defining the Interaction (page 42) Tutorial: Storyboards (page 47) 29 App Development Process Although the task

More information

What s New in Core Location

What s New in Core Location Core OS What s New in Core Location Session 706 Stephen Rhee Engineering Manager 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

More information

Learn to make desktop LE

Learn to make desktop LE HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make desktop LE P apps with real-worldam S Swift projects REEPaul Hudson F Project 1 Storm Viewer Get started coding in Swift by making an image viewer

More information

Introducing Password AutoFill for Apps

Introducing Password AutoFill for Apps Session App Frameworks #WWDC17 Introducing Password AutoFill for Apps Reducing friction for your users 206 Ricky Mondello, ios Engineer 2017 Apple Inc. All rights reserved. Redistribution or public display

More information

Lesson 1: Hello ios! 1

Lesson 1: Hello ios! 1 Contents Introduction xxv Lesson 1: Hello ios! 1 ios Developer Essentials 1 A Suitable Mac 1 A Device for Testing 2 Device Differences 2 An ios Developer Account 4 The Official ios SDK 6 The Typical App

More information

What s New in tvos 12

What s New in tvos 12 #WWDC18 What s New in tvos 12 Session 208 Hans Kim, tvos Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda Agenda

More information

Building a Game with SceneKit

Building a Game with SceneKit Graphics and Games #WWDC14 Building a Game with SceneKit Session 610 Amaury Balliet Software Engineer 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written

More information

What s New in LLDB. Debug your way to fame and glory #WWDC15. Developer Tools. Session 402

What s New in LLDB. Debug your way to fame and glory #WWDC15. Developer Tools. Session 402 Developer Tools #WWDC15 What s New in LLDB Debug your way to fame and glory Session 402 Kate Stone Software Behavioralist Sean Callanan Master of Expressions Enrico Granata Data Wizard 2015 Apple Inc.

More information

Document-Based App Programming Guide for Mac

Document-Based App Programming Guide for Mac Document-Based App Programming Guide for Mac Contents About the Cocoa Document Architecture 7 At a Glance 7 The Model-View-Controller Pattern Is Basic to a Document-Based App 8 Xcode Supports Coding and

More information

What s New in Notifications

What s New in Notifications System Frameworks #WWDC15 What s New in Notifications Session 720 Michele Campeotto ios Notifications Gokul Thirumalai Apple Push Notification Service 2015 Apple Inc. All rights reserved. Redistribution

More information