View Controller Advancements for ios8

Size: px
Start display at page:

Download "View Controller Advancements for ios8"

Transcription

1 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 written permission from Apple.

2

3 viewwilltransitiontosize:withtransitioncoordinator: <UICoordinateSpace> UITraitCollection Condensing Bars UIPresentationController UIUserInterfaceSizeClass UISplitViewController Lots of new features UIPopoverPresentationController <UIContentContainer> targetviewcontrollerforaction:sender: UISearchController UIAlertController preferredcontentsizedidchangeforchildcontainer:

4 splitviewcontroller:shouldhideviewcontroller:inorientation: willanimaterotationtointerfaceorientation:duration: UIPopoverController splitviewcontroller:willhidecontroller:withbarbuttonitem:forpopovercontroller: didrotatetointerfaceorientation: UISearchDisplayController UIAlertView interfaceorientation UIActionSheet willrotatetointerfaceorientation:duration:

5 Some familiar APIs are getting retired

6 viewwilltransitiontosize:withtransitioncoordinator: UITraitCollection <UICoordinateSpace> Condensing Bars UIPresentationController UIUserInterfaceSizeClass UISplitViewController <UIContentContainer> UIPopoverPresentationController targetviewcontrollerforaction:sender: UISearchController UIAlertController splitviewcontroller:shouldhideviewcontroller:inorientation: willanimaterotationtointerfaceorientation:duration: UIPopoverController splitviewcontroller:willhidecontroller:withbarbuttonitem:forpopovercontroller: UIActionSheet UIAlertView UISearchDisplayController didrotatetointerfaceorientation: interfaceorientation willrotatetointerfaceorientation:duration: preferredcontentsizedidchangeforchildcontainer:

7 viewwilltransitiontosize:withtransitioncoordinator: UITraitCollection <UICoordinateSpace> Condensing Bars UIPresentationController UIUserInterfaceSizeClass UISplitViewController <UIContentContainer> UIPopoverPresentationController targetviewcontrollerforaction:sender: UISearchController UIAlertController splitviewcontroller:shouldhideviewcontroller:inorientation: willanimaterotationtointerfaceorientation:duration: UIPopoverController splitviewcontroller:willhidecontroller:withbarbuttonitem:forpopovercontroller: UIActionSheet UIAlertView UISearchDisplayController didrotatetointerfaceorientation: interfaceorientation willrotatetointerfaceorientation:duration: preferredcontentsizedidchangeforchildcontainer:

8 Overview A brief discussion about UIKit s new Adaptive APIs willrotatetointerfaceorientation:duration: New UISplitViewController features interfaceorientation Some new ways to condense and hide bars didrotatetointerfaceorientation: Presentations and popovers UISearchDisplayController New API that uses transition coordinators UIPopoverController Coordinate spaces willanimaterotationtointerfaceorientation:duration:

9 Support for Adaptive User Interfaces

10 Application Structure and Layout

11 Application Structure and Layout

12 Application Structure and Layout

13 Application Structure and Layout

14 Application Structure and Layout

15 Application Structure and Layout

16 Application Structure and Layout

17 Application Structure and Layout Before ios 8 Device type Interface Orientation Size

18 Application Structure and Layout Before ios 8 Device type Interface Orientation Size ios 8 and After Traits and trait collections Size

19 What s a trait collection?

20 What s a trait collection? It s a bag of traits

21 Trait Collections A bag of traits horizontalsizeclass Compact verticalsizeclass Regular userinterfaceidiom Phone displayscale 2.0

22 What s a size class?

23 What s a size class? It s a trait that coarsely defines the space available

24

25 x-sizeclass y-sizeclass idiom Compact Regular Phone scale 2.0

26 x-sizeclass y-sizeclass idiom Compact Compact Phone scale 2.0

27

28 x-sizeclass y-sizeclass idiom Regular Regular Pad scale 1.0

29 x-sizeclass y-sizeclass idiom Regular Regular Pad scale 1.0

30 x-sizeclass y-sizeclass idiom Regular Regular Pad scale 1.0

31 x-sizeclass y-sizeclass idiom Regular Regular Pad scale x-sizeclass Compact

32 Application Structure and Layout

33 Application Structure and Layout A size class coarsely categorizes available space Horizontally Vertically

34 Application Structure and Layout A size class coarsely categorizes available space Horizontally Vertically Trait collection s vended from trait containers have both a horizontal and vertical size class trait

35 Trait Environments Legend Screen Window View Controller View

36 Trait UITraitEnvironment UITraitCollection *traitcollection;! - Legend Screen Window View Controller View

37 Trait UITraitEnvironment UITraitCollection *traitcollection;! - Legend Screen Window View Controller View

38 x-sizeclass Regular y-sizeclass idiom Regular Pad + x-sizeclass Compact scale 1.0 How does a parent view controller override the traits for a child?

39 x-sizeclass Regular y-sizeclass idiom Regular Pad + x-sizeclass Compact scale UIViewController <UITraitEnvironment>! - (void)setoverridetraitcollection: forchildviewcontroller:! - (UITraitCollection

40 Demo UISplitViewController DisplayMode and More

41 UISplitViewController

42 UISplitViewControllers can now be used on the phone

43 @interface BOOL

44 An expanded split view controller

45 An expanded split view controller

46 An expanded split view controller

47 An expanded split view controller

48 An expanded split view controller

49 An expanded split view controller

50 An expanded split view controller

51 A collapsed split view controller

52 UISplitViewController Split view controllers have a collapsed layout within horizontally compact containers e.g. phones otherwise they are expanded

53 UISplitViewController Can one enable an expanded split view controller on an iphone?

54 Embed a UISVC inside a containervc

55 Embed a UISVC inside a containervc

56 Embed a UISVC inside a containervc [containervc setoverridetraitcollection: c forchildviewcontroller:svc];

57 Embed a UISVC inside a containervc [containervc setoverridetraitcollection: c forchildviewcontroller:svc];

58 Once expanded use preferreddisplaymode

59 Once expanded use preferreddisplaymode svc.preferreddisplaymode = UISplitViewControllerDisplayModeAllVisible;

60 Once expanded use preferreddisplaymode svc.preferreddisplaymode = UISplitViewControllerDisplayModeAllVisible;

61 ( ) UISplitViewControllerDisplayMode preferreddisplaymode;! typedef NS_ENUM(NSInteger, UISplitViewControllerDisplayMode) { UISplitViewControllerDisplayModeAutomatic, UISplitViewControllerDisplayModePrimaryHidden, UISplitViewControllerDisplayModeAllVisible, UISplitViewControllerDisplayModePrimaryOverlay, };

62 ( ) UISplitViewControllerDisplayMode preferreddisplaymode;! typedef NS_ENUM(NSInteger, UISplitViewControllerDisplayMode) { UISplitViewControllerDisplayModeAutomatic, UISplitViewControllerDisplayModePrimaryHidden, UISplitViewControllerDisplayModeAllVisible, UISplitViewControllerDisplayModePrimaryOverlay, };

63 ( ) UISplitViewControllerDisplayMode preferreddisplaymode;! typedef NS_ENUM(NSInteger, UISplitViewControllerDisplayMode) { UISplitViewControllerDisplayModeAutomatic, UISplitViewControllerDisplayModePrimaryHidden, UISplitViewControllerDisplayModeAllVisible, UISplitViewControllerDisplayModePrimaryOverlay, };

64 ( ) UISplitViewControllerDisplayMode preferreddisplaymode;! typedef NS_ENUM(NSInteger, UISplitViewControllerDisplayMode) { UISplitViewControllerDisplayModeAutomatic, UISplitViewControllerDisplayModePrimaryHidden, UISplitViewControllerDisplayModeAllVisible, UISplitViewControllerDisplayModePrimaryOverlay, (readonly) UISplitViewControllerDisplayMode displaymode;! - (UIBarButtonItem *)displaymodebuttonitem;

65 You may also control the width of the split

66

67 svc.preferredprimarycolumnwidthfraction =.5;

68 svc.preferredprimarycolumnwidthfraction =.5;

69 UISplitViewController

70 (assign) CGFloat (assign) CGFloat CGFloat maximumprimarycolumnwidth; // The current primary view controller's column CGFloat primarycolumnwidth;

71 UISplitViewController What have we learned?

72 UISplitViewController What have we learned? Can be used on both the iphone AND ipad

73 UISplitViewController What have we learned? Can be used on both the iphone AND ipad Collapsed by default in horizontally compact environments

74 UISplitViewController What have we learned? Can be used on both the iphone AND ipad Collapsed by default in horizontally compact environments The animatable displaymode property controls the appearance of the primary

75 UISplitViewController What have we learned? Can be used on both the iphone AND ipad Collapsed by default in horizontally compact environments The animatable displaymode property controls the appearance of the primary The split width can be specified

76 There are many new UISVC adaptive APIs which customize how the UISVC collapses and separates

77 Condensing Bars

78

79 UINavigationController *navcontroller; navcontroller.hidesbarontap = YES;

80 UINavigationController *navcontroller; navcontroller.hidesbarontap = YES;

81

82

83

84 UINavigationController *navcontroller; navcontroller.condensesbarsonswiped = YES;

85 UINavigationController *navcontroller; navcontroller.condensesbarsonswiped = YES;

86

87 Condensing Bars New UINavigationController API

88 Condensing Bars New UINavigationController API Automatic BOOL BOOL BOOL BOOL condensesbarswhenkeyboardappears

89 Condensing Bars New UINavigationController API Automatic BOOL BOOL BOOL BOOL condensesbarswhenkeyboardappears Manual BOOL navigationbarcondensed;

90 Presentation Controllers

91 Presentation Controllers ios 7 custom presentations Presenting View Controller View Controller to be Presented

92 Presentation Controllers ios 7 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented

93 Presentation Controllers ios 7 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented Transitioning Delegate

94 Presentation Controllers ios 7 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented Transitioning Delegate

95 Presentation Controllers ios 7 custom presentations UIModalPresentationCustom Presenting View Controller <UIVIewControllerContextTransitioning> containerview viewcontrollerforkey intialframeforviewcontroller View Controller to be Presented Transitioning Delegate finalframeforviewcontroller presentationstyle AnimationController

96 Presentation Controllers ios 7 custom presentations UIModalPresentationCustom Presenting View Controller presentedviewcontroller View Controller to be Presented Transitioning Delegate

97 Presentation Controllers ios 7 Custom Presentation Limitations Presenting VC s View

98 Presentation Controllers ios 7 Custom Presentation Limitations Container View AnimationController Presenting VC s View

99 Presentation Controllers ios 7 Custom Presentation Limitations Container View AnimationController Presenting VC s View Dimming View Presented VC s View

100 Presentation Controllers ios 7 custom presentation limitations Container View Presenting VC s View Dimming View Presented VC s View Drop shadow

101 Presentation Controllers ios 7 custom presentation limitations Container View Presenting VC s View Dimming View What object owns the chrome? Presented VC s View Drop shadow

102 Presentation Controllers ios 7 custom presentation limitations Container View Presenting VC s View Dimming View What object owns the chrome? Tight coupling between presentation animator and dismissing animator Presented VC s View Drop shadow

103 Presentation Controllers ios 7 custom presentation limitations Container View Presenting VC s View Dimming View What object owns the chrome? Tight coupling between presentation animator and dismissing animator Back to back presentations become problematic Presented VC s View Drop shadow

104 Presentation Controllers ios 8 custom presentations Presenting View Controller View Controller to be Presented

105 Presentation Controllers ios 8 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented

106 Presentation Controllers ios 8 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented Transitioning Delegate

107 Presentation Controllers ios 8 custom presentations UIModalPresentationCustom Presenting View Controller presentviewcontroller: View Controller to be Presented Transitioning Delegate

108 Presentation Controllers ios 8 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented presentationcontroller Transitioning Delegate Presentation Controller

109 Presentation Controllers ios 8 custom presentations UIModalPresentationCustom Presenting View Controller View Controller to be Presented presentationcontroller Transitioning Delegate Presentation Controller Animation Controller

110 Presentation Controllers ios 8 custom presentations UIModalPresentationCustom Presenting View Controller presentedviewcontroller presentationcontroller View Controller to be Presented Transitioning Delegate Presentation Controller

111 Presentation Controllers Container View Presenting VC s View Dimming View Presented VC s View Drop shadow

112 Presentation Controllers Container View Presentation Controller Presenting VC s View Dimming View Presented VC s View Drop shadow

113 Presentation Controllers Container View containerview Presentation Controller Presenting VC s View Dimming View Presented VC s View Drop shadow

114 Presentation Controllers Container View containerview Presentation Controller Presenting VC s View Dimming View presentedview Presented VC s View presentedvc.view!= pc.presentedview Drop shadow

115 Presentation Controllers Custom presentation UIViewControllerContextTransitioning! - (UIView *)viewforkey:(nsstring *)key

116 Presentation Controllers Container View containerview Presentation Controller Presenting VC s View Dimming View presentedview Presented VC s View presentedvc.view!= pc.presentedview Drop shadow

117 Presentation Controllers Container View containerview Presentation Controller Presenting VC s View Dimming View presentedview Presented VC s View Drop shadow

118 Presentation Controllers Container View containerview Presentation Controller Dimming View presentedview Presented VC s View pc.shouldremovepresentersview = YES Drop shadow

119 Presentation Controllers Window Container View containerview Presentation Controller Dimming View presentedview Presented VC s View pc.shouldpresentinfullscreen = YES Drop shadow

120 Presentation Controllers Custom presentation UIPresentationController : NSObject <UIAppearanceContainer, UITraitEnvironment, readonly) UIView *containerview; - (UIView *)presentedview;! - (BOOL)shouldRemovePresentersView; -

121 Presentation Controllers Presentation styles

122 Presentation Controllers Presentation styles Previous ipad-only styles are available on the iphone - (But they adapt to full screen presentations)

123 Presentation Controllers Presentation styles Previous ipad-only styles are available on the iphone - (But they adapt to full screen presentations) New Presentation Styles UIModalPresentationOverFullscreen; UIModalPresentationOverCurrentContext; UIModalPresentationPopover

124 Presentation Controllers Presentation styles Previous ipad-only styles are available on the iphone - (But they adapt to full screen presentations) New Presentation Styles UIModalPresentationOverFullscreen; UIModalPresentationOverCurrentContext; UIModalPresentationPopover All presentation styles have an associated presentation controller -[UIViewController presentationcontroller] -[UIViewController popoverpresentationcontroller]

125 Presentation Controllers UIModalPresentationOverFullscreen

126 Presentation Controllers UIModalPresentationOverFullscreen UIModalOverFullscreen

127 Presentation Controllers UIModalPresentationOverCurrentContext

128 Presentation Controllers UIModalPresentationOverCurrentContext UIModalOverCurrentContext

129 Presentation Controllers UIModalPresentationPopover

130 Presentation Controllers UIModalPresentationPopover

131 Presentation Controllers Adaptive Behavior

132 Presentation Controllers Adaptive Behavior Previous ipad-only styles adapt their style when in horizontally compact containers UIModalPresentationFormSheet UIModalPresentationPageSheet UIModalPresentationPopover UIModalPresentationCustom

133 Presentation Controllers Adaptive Behavior Previous ipad-only styles adapt their style when in horizontally compact containers UIModalPresentationFormSheet UIModalPresentationPageSheet UIModalPresentationPopover UIModalPresentationCustom Supported adaptive presentation styles include UIModalPresentationFullscreen UIModalPresentationOverFullscreen UIModalPresentationNone

134 Presentation Controllers Adaptive Behavior Previous ipad-only styles adapt their style when in horizontally compact containers UIModalPresentationFormSheet UIModalPresentationPageSheet UIModalPresentationPopover UIModalPresentationCustom Supported adaptive presentation styles include UIModalPresentationFullscreen UIModalPresentationOverFullscreen UIModalPresentationNone Use the presentation controller s delegate to specify an adapted presentation style

135 Presentation Controllers Adaptive UIAdaptivePresentationControllerDelegate - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:! - UIPopoverPresentationControllerDelegate

136 Presentation Controllers Adaptive UIAdaptivePresentationControllerDelegate - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:! - UIPopoverPresentationControllerDelegate

137 Presentation Controllers Adaptive UIAdaptivePresentationControllerDelegate - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:! - UIPopoverPresentationControllerDelegate

138 Presentation Controllers Adaptive popovers How do you present a popover?

139 Presentation Controllers Adaptive popovers How do you present a popover? vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.barbuttonitem = self.commentbutton; pc.permittedarrowdirections = UIPopoverArrowDirectionAny; vc.preferredcontentsize = CGSizeMake( ); [self presentviewcontroller: vc animated:yes completion:nil];

140 Presentation Controllers Adaptive popovers How do you present a popover? vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.barbuttonitem = self.commentbutton; pc.permittedarrowdirections = UIPopoverArrowDirectionAny; vc.preferredcontentsize = CGSizeMake( ); [self presentviewcontroller: vc animated:yes completion:nil];

141 Presentation Controllers Adaptive popovers How do you present a popover? vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.barbuttonitem = self.commentbutton; pc.permittedarrowdirections = UIPopoverArrowDirectionAny; vc.preferredcontentsize = CGSizeMake( ); [self presentviewcontroller: vc animated:yes completion:nil];

142 Presentation Controllers Adaptive popovers How do you present a popover? vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.barbuttonitem = self.commentbutton; pc.permittedarrowdirections = UIPopoverArrowDirectionAny; vc.preferredcontentsize = CGSizeMake( ); [self presentviewcontroller: vc animated:yes completion:nil];

143 Presentation Controllers Adaptive popovers How do you present a popover? vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.barbuttonitem = self.commentbutton; pc.permittedarrowdirections = UIPopoverArrowDirectionAny; vc.preferredcontentsize = CGSizeMake( ); [self presentviewcontroller: vc animated:yes completion:nil];

144 Presentation Controllers Adaptive popovers

145 Presentation Controllers Adaptive popovers This is a popover presentation!

146 There are a few problems with this

147 Presentation Controllers Adaptive popovers

148 Presentation Controllers Adaptive popovers

149 Presentation Controllers Adaptive popovers Underlaps the status bar

150 Presentation Controllers Adaptive popovers Underlaps the status bar Looks real bad

151 Presentation Controllers Adaptive popovers Underlaps the status bar Looks real bad There is no way to dismiss the popover!

152 Presentation Controllers Adaptive popovers

153 Presentation Controllers Adaptive popovers Set the delegate on the presentation controller vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.delegate = self;

154 Presentation Controllers Adaptive popovers Set the delegate on the presentation controller vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.delegate = self; - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController: Have it return UIModalPresentationOverFullscreen Use UIVisualEffectView in the presented view controller Adjust the content position by accessing the presentedcontroller

155 Presentation Controllers Adaptive popovers

156 Presentation Controllers Adaptive popovers This is also a popover presentation with a different adaptation

157 Presentation Controllers Adaptive popovers This is also a popover presentation with a different adaptation But still no way to dismiss the popover!

158 Presentation Controllers Adaptive popovers

159 Presentation Controllers Adaptive popovers Set the delegate on the presentation controller vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.delegate = self;

160 Presentation Controllers Adaptive popovers Set the delegate on the presentation controller vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.delegate = self; - (UIVC *)presentationcontroller:viewcontrollerforadaptivepresentationstyle: Have it return a UINavigationController whose root VC is the presentedcontroller Add a dismiss button to the navigation bar.

161 Presentation Controllers Adaptive popovers

162 Presentation Controllers Adaptive popovers

163 Presentation Controllers Adaptive popovers Looks great. But what if I really want a popover?

164 Presentation Controllers Adaptive popovers

165 Presentation Controllers Adaptive popovers Set the delegate on the presentation controller vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.delegate = self;

166 Presentation Controllers Adaptive popovers Set the delegate on the presentation controller vc.modalpresentationstyle = UIModalPresentationPopover; UIPopoverPresentationController *pc = [vc popoverpresentationcontroller]; pc.delegate = self; - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController: Have it return UIModalPresentationNone

167 Presentation Controllers Adaptive popovers

168 Presentation Controllers Adaptive popovers

169 Presentation Controllers What did we learn?

170 Presentation Controllers What did we learn? Presentation controllers enhance the existing API for creating custom presentations

171 Presentation Controllers What did we learn? Presentation controllers enhance the existing API for creating custom presentations View controller presentations are associated with a UIPresentationController object -[UIViewController presentationcontroller] -[UIViewController popoverpresentationcontroller]

172 Presentation Controllers What did we learn? Presentation controllers enhance the existing API for creating custom presentations View controller presentations are associated with a UIPresentationController object -[UIViewController presentationcontroller] -[UIViewController popoverpresentationcontroller] Presentation controllers can easily adapt to horizontal size class changes <UIAdaptivePresentationControllerDelegate> <UIPopoverPresentationControllerDelegate>

173 Presentation Controllers What did we learn? Presentation controllers enhance the existing API for creating custom presentations View controller presentations are associated with a UIPresentationController object -[UIViewController presentationcontroller] -[UIViewController popoverpresentationcontroller] Presentation controllers can easily adapt to horizontal size class changes <UIAdaptivePresentationControllerDelegate> <UIPopoverPresentationControllerDelegate> You can create your own presentation controller s which will adapt if shouldpresentinfullscreen returns YES.

174 Transition Coordinators

175 What s a transition coordinator?

176 What s a transition coordinator? <UIViewControllerTransitionCoordinator> (UIVCTC)

177 Transition Coordinators

178 Transition Coordinators Introduced in ios 7 for custom transitions [UIViewController transitioncoordinator]! - (BOOL)animateAlongsideTransition: (void (^)(id <UIVCTCContext>context))a completion: (void (^)(id <UIVCTCContext>context))c;! They are part of the UIViewController adaptive UI story

179 Transition Coordinators UIContentContainer (nonatomic, assign) CGSize preferredcontentsize; - (void)preferredcontentsizedidchangeforchildcontentcontainer: - (void)systemlayoutfittingsizedidchangeforchildcontentcontainer:! - (void)sizeforchildcontentcontainer:withparentcontainersize: - (void)willtransitiontotraitcollection:withtransitioncoordinator: -

180 Transition Coordinators UIContentContainer (nonatomic, assign) CGSize preferredcontentsize; - (void)preferredcontentsizedidchangeforchildcontentcontainer: - (void)systemlayoutfittingsizedidchangeforchildcontentcontainer:! - (void)sizeforchildcontentcontainer:withparentcontainersize: - (void)willtransitiontotraitcollection:withtransitioncoordinator: -

181 Transition Coordinators UIContentContainer (nonatomic, assign) CGSize preferredcontentsize; - (void)preferredcontentsizedidchangeforchildcontentcontainer: - (void)systemlayoutfittingsizedidchangeforchildcontentcontainer:! - (void)sizeforchildcontentcontainer:withparentcontainersize: - (void)willtransitiontotraitcollection:withtransitioncoordinator: -

182 For the self aware App, a device rotation is only an animated bounds change. Anonymous

183

184

185 Transition Coordinators Rotation callbacks willrotatetointerfaceorientation:duration: willanimaterotationtointerfaceorientation:duration: didrotatefrominterfaceorientation: interfaceorientation

186 Transition Coordinators Rotation callbacks willrotatetointerfaceorientation:duration: willanimaterotationtointerfaceorientation:duration: didrotatefrominterfaceorientation: interfaceorientation

187 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator:

188 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: Is a replacement for the deprecated rotation callbacks

189 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: Is a replacement for the deprecated rotation callbacks

190 Transition Coordinators Rotation UIViewControllerTransitionCoordinatorContext! - (CGAffineTransform)targetTransform;! - (UIView *)viewforkey:(nsstring

191 Transition Coordinators Rotation UIViewControllerTransitionCoordinatorContext! - (CGAffineTransform)targetTransform;! - (UIView *)viewforkey:(nsstring

192 Transition Coordinators Rotation callbacks - (void) viewwilltransitiontosize:(cgsize)s withtransitioncoordinator:(uivctc)t { orientation = [self orientationfromtransform: [t targettransform]]; oldorientation = [[UIApplication sharedapplication] statusbarorientation];! [self mywillrotatetointerfaceorientation:orientation duration: duration];! [t animatealongsidetransition:^(id <UIVCTCContext>) { [self mywillanimaterotationtointerfaceorientation:orientation duration:duration]; } completion: ^(id <UIVCTCContext>) { [self mydidanimatefrominterfaceorientation:oldorientation]; }]; }

193 Transition Coordinators Rotation callbacks - (void) viewwilltransitiontosize:(cgsize)s withtransitioncoordinator:(uivctc)t { orientation = [self orientationfromtransform: [t targettransform]]; oldorientation = [[UIApplication sharedapplication] statusbarorientation];! [self mywillrotatetointerfaceorientation:orientation duration: duration];! [t animatealongsidetransition:^(id <UIVCTCContext>) { [self mywillanimaterotationtointerfaceorientation:orientation duration:duration]; } completion: ^(id <UIVCTCContext>) { [self mydidanimatefrominterfaceorientation:oldorientation]; }]; }

194 Transition Coordinators Rotation callbacks - (void) viewwilltransitiontosize:(cgsize)s withtransitioncoordinator:(uivctc)t { orientation = [self orientationfromtransform: [t targettransform]]; oldorientation = [[UIApplication sharedapplication] statusbarorientation];! [self mywillrotatetointerfaceorientation:orientation duration: duration];! [t animatealongsidetransition:^(id <UIVCTCContext>) { [self mywillanimaterotationtointerfaceorientation:orientation duration:duration]; } completion: ^(id <UIVCTCContext>) { [self mydidanimatefrominterfaceorientation:oldorientation]; }]; }

195 Transition Coordinators Rotation callbacks - (void) viewwilltransitiontosize:(cgsize)s withtransitioncoordinator:(uivctc)t { orientation = [self orientationfromtransform: [t targettransform]]; oldorientation = [[UIApplication sharedapplication] statusbarorientation];! [self mywillrotatetointerfaceorientation:orientation duration: duration];! [t animatealongsidetransition:^(id <UIVCTCContext>) { [self mywillanimaterotationtointerfaceorientation:orientation duration:duration]; } completion: ^(id <UIVCTCContext>) { [self mydidanimatefrominterfaceorientation:oldorientation]; }]; }

196 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator:

197 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: The legacy rotation methods are still available Just don t implement the method

198 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: The legacy rotation methods are still available Just don t implement the method Most view controller transitions are immediate when called from within the dynamic scope of this method (Not in the animate alongside blocks)

199 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: The legacy rotation methods are still available Just don t implement the method Most view controller transitions are immediate when called from within the dynamic scope of this method (Not in the animate alongside blocks) Call super in order to forward to descendent view controllers

200 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: The legacy rotation methods are still available Just don t implement the method Most view controller transitions are immediate when called from within the dynamic scope of this method (Not in the animate alongside blocks) Call super in order to forward to descendent view controllers Only necessary when you need to do a special size transition

201 Scroll Direction

202 Scroll Direction

203 Scroll Direction

204 Scroll Direction

205 Scroll Direction

206 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: Before animatealongside:withtransitioncoordinator:! CGAffineTransform transform = [coordinator targettransform]; CGAffineTransform invertedrotation = CGAffineTransformInvert(transform); CGRect currentbounds = self.view.bounds;!

207 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: Before animatealongside:withtransitioncoordinator:! CGAffineTransform transform = [coordinator targettransform]; CGAffineTransform invertedrotation = CGAffineTransformInvert(transform); CGRect currentbounds = self.view.bounds;! Alongside block! self.view.transform = CGAffineTransformConcat(self.view.transform, invertedrotation); _counterrotation = CGAffineTransformConcat(_counterRotation, transform); self.view.bounds = currentbounds;

208 Transition Coordinators viewwilltransitiontosize:withtransitioncoordinator: Before animatealongside:withtransitioncoordinator:! CGAffineTransform transform = [coordinator targettransform]; CGAffineTransform invertedrotation = CGAffineTransformInvert(transform); CGRect currentbounds = self.view.bounds;! Alongside block! self.view.transform = CGAffineTransformConcat(self.view.transform, invertedrotation); _counterrotation = CGAffineTransformConcat(_counterRotation, transform); self.view.bounds = currentbounds;! Completion block! [UIView animatewithduration:.5 animations:^{ for(pncollectionviewcell *cell in [self.collectionview visiblecells]{ cell.contentview.transform = _counterrotation; } }];

209 Transition Coordinators What did we learn?

210 Transition Coordinators What did we learn? Transition coordinators are being used in ios 8 adaptive APIs viewwilltransitiontosize:transitioncoordinator: willtransitiontotraitcollection:transitioncoordinator:

211 Transition Coordinators What did we learn? Transition coordinators are being used in ios 8 adaptive APIs viewwilltransitiontosize:transitioncoordinator: willtransitiontotraitcollection:transitioncoordinator: You may use a transition coordinator in response to preferredcontentsizedidchange:

212 Transition Coordinators What did we learn? Transition coordinators are being used in ios 8 adaptive APIs viewwilltransitiontosize:transitioncoordinator: willtransitiontotraitcollection:transitioncoordinator: You may use a transition coordinator in response to preferredcontentsizedidchange: Rotation callbacks are being deprecated

213 Screen Coordinates

214 Screen Orientation Keyboard Size: (162,568) [[UIScreen mainscreen] bounds] = {320,568}

215 Interface Orientation Keyboard Size: (568,162) [[UIScreen mainscreen] bounds] = {568,320}

216 ios UIViewControllers Changes to screen coordinates UIScreen is now interface oriented -[UIScreen bounds] now interface-oriented -[UIScreen applicationframe] now interface-oriented Status bar frame notifications are interface-oriented Keyboard frame notifications are interface-oriented

217 ios UIViewControllers Changes to screen UICoordinateSpace! - (CGPoint)convertPoint:(CGPoint) tocoordinatespace:(id <UICoordinateSpace>)space;! - (CGRect)convertRect:(CGRect) CGRect bounds;

218 ios UIViewControllers Changes to screen coordinates UIView (readonly) id <UICoordinateSpace> (readonly) id <UICoordinateSpace>

219 ios UIViewControllers Changes to screen coordinates UIView (readonly) id <UICoordinateSpace> (readonly) id <UICoordinateSpace> [view convertpoint:p tocoordinatespace:view.window.screen.fixedcoordinatespace];! [view.window.screen.fixedcoordinatespace convertpoint:p tocoordinatespace:view];

220 What We Discussed Today

221 What We Discussed Today Trait collections and how view controllers may override them

222 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features

223 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features Simple properties that condense and hide bars

224 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features Simple properties that condense and hide bars UIPresentationControllers and new presentation styles

225 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features Simple properties that condense and hide bars UIPresentationControllers and new presentation styles New API that uses transition coordinators

226 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features Simple properties that condense and hide bars UIPresentationControllers and new presentation styles New API that uses transition coordinators Rotation callbacks are deprecated

227 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features Simple properties that condense and hide bars UIPresentationControllers and new presentation styles New API that uses transition coordinators Rotation callbacks are deprecated Use viewwilltransitiontosize:withtransitioncoordinator: instead

228 What We Discussed Today Trait collections and how view controllers may override them Many new UISplitViewController features Simple properties that condense and hide bars UIPresentationControllers and new presentation styles New API that uses transition coordinators Rotation callbacks are deprecated Use viewwilltransitiontosize:withtransitioncoordinator: instead Screen bounds is interface orientated

229 Related Sessions Building Adaptive Apps with UIKit Mission Wednesday 10:15 AM A Look Inside Presentation Controllers Mission Thursday 11:30 AM Building Interruptible and Responsive Interactions Presidio Friday 11:30 AM Creating Extensions for ios and OS X, Part 1 Mission Tuesday 2:00 PM

230 More Information Jake Behrens App Frameworks Evangelist Documentation and Sample Code ios Dev Center Apple Developer Forums

231

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

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

ITP 342 Mobile App Dev. Alerts

ITP 342 Mobile App Dev. Alerts ITP 342 Mobile App Dev Alerts Alerts UIAlertController replaces both UIAlertView and UIActionSheet, thereby unifying the concept of alerts across the system, whether presented modally or in a popover.

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

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

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

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

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

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

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

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

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

Computer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers

Computer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers Computer Science 251 iphone Application Development Autorotation, Popover Controllers, Modal Controllers Two Types of Orientation Device: physically upside down, rotated left, on its back, etc. Can be

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

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

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

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

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

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

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

User Experience: Windows & Views

User Experience: Windows & Views View Controller Programming Guide for ios User Experience: Windows & Views 2011-01-07 Apple Inc. 2011 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval

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

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

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

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

App Extension Best Practices

App Extension Best Practices App Frameworks #WWDC15 App Extension Best Practices Session 224 Sophia Teutschler UIKit Engineer Ian Baird CoreOS Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

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

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

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

Storyboards and Controllers on OS X

Storyboards and Controllers on OS X 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

More information

imessage Apps and Stickers, Part 2

imessage Apps and Stickers, Part 2 App Frameworks #WWDC16 imessage Apps and Stickers, Part 2 Interactive Messages Session 224 Alex Carter Messages Engineer Stephen Lottermoser Messages Engineer 2016 Apple Inc. All rights reserved. Redistribution

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

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

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

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

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

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

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

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

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

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

A Better MVC. 300 line view controllers or bust. Dave A guy who thinks too deeply about stuff

A Better MVC. 300 line view controllers or bust. Dave A guy who thinks too deeply about stuff A Better MVC 300 line view controllers or bust Dave DeLong @davedelong A guy who thinks too deeply about stuff Heads Up This is all my opinion (! hi legal & pr teams!) Lots of similar terminology View

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

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

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

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

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

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

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

What s New in watchos

What s New in watchos Session App Frameworks #WWDC17 What s New in watchos 205 Ian Parks, watchos Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from

More information

View Controllers CPRE 388

View Controllers CPRE 388 View Controllers CPRE 388 View Controllers Manage views in model view controller design template. Many types: custom view controller; container view controller; modal view controller. Custom View controllers

More information

ITP 342 Mobile App Dev. Animation

ITP 342 Mobile App Dev. Animation ITP 342 Mobile App Dev Animation Core Animation Introduced in Mac OS X Leopard Uses animatable "layers" built on OpenGL UIKit supports Core Animation out of the box Every UIView has a CALayer behind it

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

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

Why Model-View-Controller?

Why Model-View-Controller? View Controllers Why Model-View-Controller? Ever used the word spaghetti to describe code? Clear responsibilities make things easier to maintain Avoid having one monster class that does everything Why

More information

let w = UIWindow(frame: UIScreen.mainScreen().bounds)

let w = UIWindow(frame: UIScreen.mainScreen().bounds) PART I Views The things that appear in your app s interface are, ultimately, views. A view is a unit of your app that knows how to draw itself. A view also knows how to sense that the user has touched

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

ITP 342 Mobile App Dev. Animation

ITP 342 Mobile App Dev. Animation ITP 342 Mobile App Dev Animation Core Animation Introduced in Mac OS X Leopard Uses animatable "layers" built on OpenGL UIKit supports Core Animation out of the box Every UIView has a CALayer behind it

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

ITP 342 Mobile App Dev. Interface Fun

ITP 342 Mobile App Dev. Interface Fun ITP 342 Mobile App Dev Interface Fun Human Interface Guidelines ios Human Interface Guidelines https://developer.apple.com/ library/ios/documentation/ userexperience/conceptual/ MobileHIG/index.html 2

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

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

Announcements. Today s Topics

Announcements. Today s Topics Announcements Lab 2 is due tonight by 11:59 PM Late policy is 10% of lab total per day late So -7.5 points per day late for lab 2 Labs 3 and 4 are posted on the course website Extensible Networking Platform

More information

Assignment III: Graphing Calculator

Assignment III: Graphing Calculator Assignment III: Graphing Calculator Objective The goal of this assignment is to reuse your CalculatorBrain and CalculatorViewController objects to build a Graphing Calculator for iphone and ipad. By doing

More information

ITP 342 Mobile App Dev. Interface Components

ITP 342 Mobile App Dev. Interface Components ITP 342 Mobile App Dev Interface Components Human Interface Guidelines ios Human Interface Guidelines (HIG) https://developer.apple.com/ library/ios/documentation/us erexperience/conceptual/m obilehig/index.html

More information

OVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net

OVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net OVERVIEW Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net Microsoft MVP for 4 years C#, WinForms, WPF, Silverlight Joined Cynergy about

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

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017 Stanford Developing Applications for ios Today Timer Periodically execute a block of code Blinking FaceIt Demo Animation Animating changes to UIViews Smoother Blinking FaceIt Head-shaking FaceIt Animating

More information

ITP 342 Mobile App Dev. Animation

ITP 342 Mobile App Dev. Animation ITP 342 Mobile App Dev Animation Views Views are the fundamental building blocks of your app's user interface, and the UIView class defines the behaviors that are common to all views. Responsibilities

More information

Managing Documents In Your ios Apps

Managing Documents In Your ios Apps Session #WWDC18 Managing Documents In Your ios Apps 216 Brandon Tennant, Software Engineer Thomas Deniau, Software Engineer Rony Fadel, Software Engineer 2018 Apple Inc. All rights reserved. Redistribution

More information

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson Session App Frameworks #WWDC17 What s New in MapKit 237 Fredrik Olsson 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. MKMapView.mapType.standard

More information

News- ipad: ios(swift) Application

News- ipad: ios(swift) Application News- ipad: ios(swift) Application Document Version 1.0.1 Date: 9 th Nov, 2014 2 [NEWS- IPAD: APP DOCUMENTATION] Important Notes:... 6 AppDelegate Class Reference... 7 Tasks... 7 Instance Methods... 7

More information

ReportPlus Embedded. ReportPlus Embedded - ios SDK Guide 1.0

ReportPlus Embedded. ReportPlus Embedded - ios SDK Guide 1.0 ReportPlus Embedded ios SDK Guide ReportPlus Embedded - ios SDK Guide 1.0 Disclaimer THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED AS IS WITHOUT ANY EXPRESS REPRESENTATIONS OF WARRANTIES. IN ADDITION,

More information

Enabling Your App for CarPlay

Enabling Your App for CarPlay Session App Frameworks #WWDC17 Enabling Your App for CarPlay 719 Albert Wan, CarPlay Engineering 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

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

Objective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008

Objective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008 Objective-C Primer iphone Programmer s Association Lorenzo Swank September 10, 2008 Disclaimer Content was blatantly and unapologetically stolen from the WWDC 2007 Fundamentals of Cocoa session, as well

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

Integrating Apps and Content with AR Quick Look

Integrating Apps and Content with AR Quick Look Session #WWDC18 Integrating Apps and Content with AR Quick Look 603 David Lui, ARKit Engineering Dave Addey, ARKit Engineering 2018 Apple Inc. All rights reserved. Redistribution or public display not

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

Xcode 6 and ios 8 What s New for Software Developers

Xcode 6 and ios 8 What s New for Software Developers Xcode 6 and ios 8 What s New for Software Developers August 2014 Norman McEntire! norman.mcentire@servin.com Slides and Video of this presentation will be posted on Tuesday Aug 26 here: http://servin.com!1

More information

Editing Media with AV Foundation

Editing Media with AV Foundation Editing Media with AV Foundation Overview and best practices Eric Lee iphone Engineering 2 What You ll Learn Why and when you should use AV Foundation editing Concepts underlying manipulation of timed-based

More information

CS193P - Lecture 11. iphone Application Development. Text Input Presenting Content Modally

CS193P - Lecture 11. iphone Application Development. Text Input Presenting Content Modally CS193P - Lecture 11 iphone Application Development Text Input Presenting Content Modally 1 Announcements 2 Announcements Paparazzi 3 assignment is due Wednesday 2/17 2 Announcements Paparazzi 3 assignment

More information

Reader Release Notes. January 7, Release version: 3.1

Reader Release Notes. January 7, Release version: 3.1 Reader Release Notes January 7, 2019 Release version: 3.1 MindManager Reader Version 3.1... 2 General Information... 2 New in Version 3.1... 2 Supported Features... 2 Elements... 2 Text... 3 Navigation...

More information

CloudKit Tips And Tricks

CloudKit Tips And Tricks System Frameworks #WWDC15 CloudKit Tips And Tricks Session 715 Nihar Sharma CloudKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

CS193P - Lecture 11. iphone Application Development. Text Input Presenting Content Modally

CS193P - Lecture 11. iphone Application Development. Text Input Presenting Content Modally CS193P - Lecture 11 iphone Application Development Text Input Presenting Content Modally Announcements Presence 3 assignment has been posted, due Tuesday 5/12 Final project proposals due on Monday 5/11

More information

Views. A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space

Views. A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Views A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Draws and handles events in that rectangle Hierarchical A view has only one superview - (UIView *)superview

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

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

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

Stanford CS193p. Developing Applications for ios. Spring Stanford CS193p. Spring 2012

Stanford CS193p. Developing Applications for ios. Spring Stanford CS193p. Spring 2012 Developing Applications for ios Today NSTimer and perform after delay Two delayed-action alternatives. More View Animation Continuation of Kitchen Sink demo Alerts and Action Sheets Notifying the user

More information

Swift API Design Guidelines

Swift API Design Guidelines Developer Tools #WWDC16 Swift API Design Guidelines The Grand Renaming Session 403 Doug Gregor Swift Engineer Michael Ilseman Swift Engineer 2016 Apple Inc. All rights reserved. Redistribution or public

More information

User Experience: Windows & Views

User Experience: Windows & Views View Programming Guide for ios User Experience: Windows & Views 2010-07-07 Apple Inc. 2010 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or

More information

Announcements. Paparazzi 3 assignment is due Wednesday 2/17 This Friday s extra session will feature Evan Doll

Announcements. Paparazzi 3 assignment is due Wednesday 2/17 This Friday s extra session will feature Evan Doll CS193P - Lecture 11 iphone Application Development Text Input Presenting Content Modally 1 Announcements Paparazzi 3 assignment is due Wednesday 2/17 This Friday s extra session will feature Evan Doll

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

Getting the Most Out of HealthKit

Getting the Most Out of HealthKit App Frameworks #WWDC16 Getting the Most Out of HealthKit What s new and best practices Session 209 Matthew Salesi ios Software Engineer Joefrey Kibuule ios Software Engineer 2016 Apple Inc. All rights

More information

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016

Stanford CS193p. Developing Applications for ios. Spring CS193p. Spring 2016 Stanford Developing Applications for ios Today Memory Management for Reference Types Controlling when things leave the heap Closure Capture Closures capture things into the heap too Extensions A simple,

More information

ios Mobile Development

ios Mobile Development ios Mobile Development Today UITextView Scrollable, editable/selectable view of a mutable attributed string. View Controller Lifecycle Finding out what s happening as a VC is created, hooked up to the

More information

Event Delivery: The Responder Chain

Event Delivery: The Responder Chain When you design your app, it s likely that you want to respond to events dynamically. For example, a touch can occur in many different objects onscreen, and you have to decide which object you want to

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