what’s new in cocoa touch · these are confidential sessions—please refrain from streaming,...
TRANSCRIPT
![Page 1: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/1.jpg)
These are confidential sessions—please refrain from streaming, blogging, or taking pictures
Session 203
What’s New in Cocoa Touch
Chris ParkerUIKit Engineer
![Page 2: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/2.jpg)
![Page 3: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/3.jpg)
![Page 4: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/4.jpg)
Multitasking
![Page 5: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/5.jpg)
Multitasking
• Background fetching• Remote notification• Background transfers
![Page 6: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/6.jpg)
Background fetchingMultitasking
• New background modefetch
• Application launched opportunistically• New delegate method on UIApplication is called
- (void)application:(UIApplication *)applicationperformFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
• Call the completion handler when fetch is complete
![Page 7: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/7.jpg)
Background fetchingMultitasking
• New background modefetch
• Application launched opportunistically• New delegate method on UIApplication is called
- (void)application:(UIApplication *)applicationperformFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
• Call the completion handler when fetch is complete
![Page 8: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/8.jpg)
Background fetchingMultitasking
• Tuning the fetch interval- (void)setMinimumBackgroundFetchInterval:(NSTimeInterval)minInterval;
• Constantsconst NSTimeInterval UIApplicationBackgroundFetchIntervalMinimumconst NSTimeInterval UIApplicationBackgroundFetchIntervalNever
![Page 9: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/9.jpg)
Background fetchingMultitasking
• Tuning the fetch interval- (void)setMinimumBackgroundFetchInterval:(NSTimeInterval)minInterval;
• Constantsconst NSTimeInterval UIApplicationBackgroundFetchIntervalMinimumconst NSTimeInterval UIApplicationBackgroundFetchIntervalNever
• You must call this at launch• Your own values work too!
![Page 10: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/10.jpg)
Remote notificationsMultitasking
• New background moderemote-notification
• New delegate method on UIApplication is called - (void)application:(UIApplication *)applicationdidReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
• Call the completion handler when fetch is complete
![Page 11: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/11.jpg)
Remote notificationsMultitasking
• New background moderemote-notification
• New delegate method on UIApplication is called - (void)application:(UIApplication *)applicationdidReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
• Call the completion handler when fetch is complete
![Page 12: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/12.jpg)
Fetch resultsMultitasking
• Completion handlervoid (^)(UIBackgroundFetchResult result))completionHandler;
typedef NS_ENUM(NSUInteger, UIBackgroundFetchResult) { UIBackgroundFetchResultNewData, UIBackgroundFetchResultNoData, UIBackgroundFetchResultFailed}
![Page 13: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/13.jpg)
Fetch resultsMultitasking
• You call the completion handlervoid (^)(UIBackgroundFetchResult result))completionHandler;
typedef NS_ENUM(NSUInteger, UIBackgroundFetchResult) { UIBackgroundFetchResultNewData, UIBackgroundFetchResultNoData, UIBackgroundFetchResultFailed}
![Page 14: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/14.jpg)
Background transfersMultitasking
• NSURLSession■ Replacement API for NSURLConnection■ Data, upload, download tasks■ Sessions have identifiers
• New delegate method on UIApplication is called - (void)application:(UIApplication *)applicationhandleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler;
• Call the completion handler when you’re done handling callbacks
What’s New in Foundation Networking MissionWednesday 9:00AM
![Page 15: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/15.jpg)
Views and Images
![Page 16: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/16.jpg)
Image Rendering Modes
• Creating an image with a rendering mode- (UIImage *)imageWithRenderingMode:(UIImageRenderingMode)renderingMode;
• Pass the modetypedef NS_ENUM(NSInteger, UIImageRenderingMode) { UIImageRenderingModeAutomatic, UIImageRenderingModeAlwaysOriginal, UIImageRenderingModeAlwaysTemplate}
![Page 17: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/17.jpg)
Image Rendering Modes
• Creating an image with a rendering mode- (UIImage *)imageWithRenderingMode:(UIImageRenderingMode)renderingMode;
• Pass the modetypedef NS_ENUM(NSInteger, UIImageRenderingMode) { UIImageRenderingModeAutomatic, UIImageRenderingModeAlwaysOriginal, UIImageRenderingModeAlwaysTemplate}
![Page 18: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/18.jpg)
Image Rendering Modes
• Creating an image with a rendering mode- (UIImage *)imageWithRenderingMode:(UIImageRenderingMode)renderingMode;
• Pass the modetypedef NS_ENUM(NSInteger, UIImageRenderingMode) { UIImageRenderingModeAutomatic, UIImageRenderingModeAlwaysOriginal, UIImageRenderingModeAlwaysTemplate}
![Page 19: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/19.jpg)
Image Rendering Modes
• Creating an image with a rendering mode- (UIImage *)imageWithRenderingMode:(UIImageRenderingMode)renderingMode;
• Pass the modetypedef NS_ENUM(NSInteger, UIImageRenderingMode) { UIImageRenderingModeAutomatic, UIImageRenderingModeAlwaysOriginal, UIImageRenderingModeAlwaysTemplate}
![Page 20: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/20.jpg)
Tint
• New UIView property@property (nonatomic, retain) UIColor *tintColor;
![Page 21: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/21.jpg)
Tint
• New UIView property@property (nonatomic, retain) UIColor *tintColor;
![Page 22: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/22.jpg)
Tint
• New UIView property@property (nonatomic, retain) UIColor *tintColor;
![Page 23: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/23.jpg)
Tint
• New UIView property@property (nonatomic, retain) UIColor *tintColor;
• Dimming adjustment behavior@property (nonatomic) UIViewTintAdjustmentMode tintAdjustmentMode;
![Page 24: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/24.jpg)
Tint
• New UIView property@property (nonatomic, retain) UIColor *tintColor;
• Dimming adjustment behavior@property (nonatomic) UIViewTintAdjustmentMode tintAdjustmentMode;
• Finding out about changes- (void)tintColorDidChange;
![Page 25: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/25.jpg)
View Animation
• No animations!+ (void)performWithoutAnimation:(void (^)(void))actionsWithoutAnimation;
![Page 26: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/26.jpg)
KeyframesView Animation
+ (void)animateKeyframesWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion;
+ (void)addKeyframeWithRelativeStartTime:(double)frameStartTime relativeDuration:(double)frameDuration animations:(void (^)(void))animations;
![Page 27: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/27.jpg)
KeyframesView Animation
+ (void)animateKeyframesWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion;
+ (void)addKeyframeWithRelativeStartTime:(double)frameStartTime relativeDuration:(double)frameDuration animations:(void (^)(void))animations;
![Page 28: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/28.jpg)
Keyframe animation optionsView Animation
typedef NS_OPTIONS(NSUInteger, UIViewKeyframeAnimationOptions) { UIViewKeyframeAnimationOptionLayoutSubviews = UIViewAnimationOptionLayoutSubviews, UIViewKeyframeAnimationOptionAllowUserInteraction = UIViewAnimationOptionAllowUserInteraction, UIViewKeyframeAnimationOptionBeginFromCurrentState = UIViewAnimationOptionBeginFromCurrentState, UIViewKeyframeAnimationOptionRepeat = UIViewAnimationOptionRepeat, UIViewKeyframeAnimationOptionAutoreverse = UIViewAnimationOptionAutoreverse, UIViewKeyframeAnimationOptionOverrideInheritedDuration = UIViewAnimationOptionOverrideInheritedDuration, UIViewKeyframeAnimationOptionCalculationModeLinear = 0 << 9, UIViewKeyframeAnimationOptionCalculationModeDiscrete = 1 << 9, UIViewKeyframeAnimationOptionCalculationModePaced = 2 << 9, UIViewKeyframeAnimationOptionCalculationModeCubic = 3 << 9, UIViewKeyframeAnimationOptionCalculationModeCubicPaced = 4 << 9}
![Page 29: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/29.jpg)
Motion Effects
• Applies relative values to keypaths of a target view• Affected by device “pose” or position• Affects animatable properties only
![Page 30: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/30.jpg)
UIInterpolatingMotionEffectMotion Effects
• Initialization- (instancetype)initWithKeyPath:(NSString *)keyPath type:(UIInterpolatingMotionEffectType)type;
• Typestypedef NS_ENUM(NSInteger, UIInterpolatingMotionEffectType) { UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis, UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis};
![Page 31: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/31.jpg)
UIInterpolatingMotionEffectMotion Effects
• Initialization- (instancetype)initWithKeyPath:(NSString *)keyPath type:(UIInterpolatingMotionEffectType)type;
• Typestypedef NS_ENUM(NSInteger, UIInterpolatingMotionEffectType) { UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis, UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis};
![Page 32: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/32.jpg)
UIInterpolatingMotionEffectMotion Effects
• Initialization- (instancetype)initWithKeyPath:(NSString *)keyPath type:(UIInterpolatingMotionEffectType)type;
• Typestypedef NS_ENUM(NSInteger, UIInterpolatingMotionEffectType) { UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis, UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis};
![Page 33: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/33.jpg)
UIInterpolatingMotionEffectMotion Effects
• Initialization- (instancetype)initWithKeyPath:(NSString *)keyPath type:(UIInterpolatingMotionEffectType)type;
• Typestypedef NS_ENUM(NSInteger, UIInterpolatingMotionEffectType) { UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis, UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis};
• Managing values@property (retain, nonatomic) id minimumRelativeValue;@property (retain, nonatomic) id maximumRelativeValue;
![Page 34: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/34.jpg)
UIMotionEffectMotion Effects
• Abstract superclass• One method(!)
- (NSDictionary *)keyPathsAndRelativeValuesForViewerOffset: (UIOffset)viewerOffset;
typedef struct UIOffset { CGFloat horizontal, vertical;} UIOffset;
![Page 35: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/35.jpg)
UIViewMotion Effects
• Adding and removing- (void)addMotionEffect:(UIMotionEffect *)effect;- (void)removeMotionEffect:(UIMotionEffect *)effect;
• What’s already there?@property (copy, nonatomic) NSArray *motionEffects;
![Page 36: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/36.jpg)
UIViewMotion Effects
• Adding and removing- (void)addMotionEffect:(UIMotionEffect *)effect;- (void)removeMotionEffect:(UIMotionEffect *)effect;
• What’s already there?@property (copy, nonatomic) NSArray *motionEffects;
![Page 37: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/37.jpg)
Collection Views
![Page 38: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/38.jpg)
Transitions between layoutsCollection View
- (void)setCollectionViewLayout:(UICollectionViewLayout *)layout animated:(BOOL)animated completion:(void (^)(BOOL finished))completion;
![Page 39: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/39.jpg)
UICollectionViewTransitionLayoutCollection View
• Initializing- (id)initWithCurrentLayout:(UICollectionViewLayout *)currentLayout nextLayout:(UICollectionViewLayout *)newLayout;
• Managing values- (void)updateValue:(CGFloat)value forAnimatedKey:(NSString *)key;- (CGFloat)valueForAnimatedKey:(NSString *)key;
• Progress@property (assign, nonatomic) CGFloat transitionProgress;
![Page 40: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/40.jpg)
UICollectionViewTransitionLayoutCollection View
• Initializing- (id)initWithCurrentLayout:(UICollectionViewLayout *)currentLayout nextLayout:(UICollectionViewLayout *)newLayout;
• Managing values- (void)updateValue:(CGFloat)value forAnimatedKey:(NSString *)key;- (CGFloat)valueForAnimatedKey:(NSString *)key;
• Progress@property (assign, nonatomic) CGFloat transitionProgress;
![Page 41: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/41.jpg)
UICollectionViewTransitionLayoutCollection View
• Initializing- (id)initWithCurrentLayout:(UICollectionViewLayout *)currentLayout nextLayout:(UICollectionViewLayout *)newLayout;
• Managing values- (void)updateValue:(CGFloat)value forAnimatedKey:(NSString *)key;- (CGFloat)valueForAnimatedKey:(NSString *)key;
• Progress@property (assign, nonatomic) CGFloat transitionProgress;
![Page 42: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/42.jpg)
View Controllers
![Page 43: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/43.jpg)
wantsFullScreenLayoutLayout
![Page 44: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/44.jpg)
wantsFullScreenLayoutLayout
![Page 45: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/45.jpg)
wantsFullScreenLayoutLayout
• Deprecated in iOS 7.0
![Page 46: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/46.jpg)
Extended edgesLayout
typedef NS_OPTIONS(NSUInteger, UIExtendedEdge) { UIExtendedEdgeNone = 0, UIExtendedEdgeTop = 1 << 0, UIExtendedEdgeLeft = 1 << 1, UIExtendedEdgeBottom = 1 << 2, UIExtendedEdgeRight = 1 << 3, UIExtendedEdgeAll = UIExtendedEdgeTop | UIExtendedEdgeLeft | UIExtendedEdgeBottom | UIExtendedEdgeRight};
@property(nonatomic,assign) UIExtendedEdge edgesForExtendedLayout;@property(nonatomic,assign) BOOL extendedLayoutIncludesOpaqueBars;@property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets;
![Page 47: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/47.jpg)
Extended edgesLayout
typedef NS_OPTIONS(NSUInteger, UIExtendedEdge) { UIExtendedEdgeNone = 0, UIExtendedEdgeTop = 1 << 0, UIExtendedEdgeLeft = 1 << 1, UIExtendedEdgeBottom = 1 << 2, UIExtendedEdgeRight = 1 << 3, UIExtendedEdgeAll = UIExtendedEdgeTop | UIExtendedEdgeLeft | UIExtendedEdgeBottom | UIExtendedEdgeRight};
@property(nonatomic,assign) UIExtendedEdge edgesForExtendedLayout;@property(nonatomic,assign) BOOL extendedLayoutIncludesOpaqueBars;@property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets
![Page 48: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/48.jpg)
Extended edgesLayout
typedef NS_OPTIONS(NSUInteger, UIExtendedEdge) { UIExtendedEdgeNone = 0, UIExtendedEdgeTop = 1 << 0, UIExtendedEdgeLeft = 1 << 1, UIExtendedEdgeBottom = 1 << 2, UIExtendedEdgeRight = 1 << 3, UIExtendedEdgeAll = UIExtendedEdgeTop | UIExtendedEdgeLeft | UIExtendedEdgeBottom | UIExtendedEdgeRight};
@property(nonatomic,assign) UIExtendedEdge edgesForExtendedLayout;@property(nonatomic,assign) BOOL extendedLayoutIncludesOpaqueBars;@property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets
![Page 49: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/49.jpg)
Extended edgesLayout
typedef NS_OPTIONS(NSUInteger, UIExtendedEdge) { UIExtendedEdgeNone = 0, UIExtendedEdgeTop = 1 << 0, UIExtendedEdgeLeft = 1 << 1, UIExtendedEdgeBottom = 1 << 2, UIExtendedEdgeRight = 1 << 3, UIExtendedEdgeAll = UIExtendedEdgeTop | UIExtendedEdgeLeft | UIExtendedEdgeBottom | UIExtendedEdgeRight};
@property(nonatomic,assign) UIExtendedEdge edgesForExtendedLayout;@property(nonatomic,assign) BOOL extendedLayoutIncludesOpaqueBars;@property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets
![Page 50: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/50.jpg)
Content sizeLayout
@property (nonatomic) CGSize preferredContentSize;
![Page 51: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/51.jpg)
Status bar appearanceLayout
• New behavior for the status bar• New status bar style
typedef NS_ENUM(NSInteger, UIStatusBarStyle) { UIStatusBarStyleDefault UIStatusBarStyleLightContent NS_ENUM_AVAILABLE_IOS(7_0), UIStatusBarStyleBlackTranslucent, UIStatusBarStyleBlackOpaque}
![Page 52: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/52.jpg)
Status bar appearanceLayout
• New behavior for the status bar• New status bar style
typedef NS_ENUM(NSInteger, UIStatusBarStyle) { UIStatusBarStyleDefault UIStatusBarStyleLightContent NS_ENUM_AVAILABLE_IOS(7_0), UIStatusBarStyleBlackTranslucent, UIStatusBarStyleBlackOpaque}
![Page 53: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/53.jpg)
Status bar appearanceLayout
• New behavior for the status bar• New status bar style
typedef NS_ENUM(NSInteger, UIStatusBarStyle) { UIStatusBarStyleDefault UIStatusBarStyleLightContent NS_ENUM_AVAILABLE_IOS(7_0), UIStatusBarStyleBlackTranslucent, UIStatusBarStyleBlackOpaque}
![Page 54: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/54.jpg)
Status bar appearanceLayout
• New behavior for the status bar• New status bar style
typedef NS_ENUM(NSInteger, UIStatusBarStyle) { UIStatusBarStyleDefault UIStatusBarStyleLightContent NS_ENUM_AVAILABLE_IOS(7_0), UIStatusBarStyleBlackTranslucent, UIStatusBarStyleBlackOpaque}
![Page 55: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/55.jpg)
Custom Transitions
• Bounded, “canned” transitions■ Navigation controller push and pop■ Presentation and dismissal
• Interactive, user-driven transitions■ Driven by gestures or other events
• New delegate method on UIViewController@property (nonatomic,retain) id <UIViewControllerTransitioningDelegate> transitioningDelegate;
![Page 56: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/56.jpg)
UIViewControllerTransitioningDelegateCustom Transitions
@protocol UIViewControllerTransitioningDelegate <NSObject>@optional- (id <UIViewControllerAnimatedTransitioning>) animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source;
- (id <UIViewControllerAnimatedTransitioning>) animationControllerForDismissedController:(UIViewController *)dismissed;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation: (id <UIViewControllerAnimatedTransitioning>)animator;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal: (id <UIViewControllerAnimatedTransitioning>)animator;@end
![Page 57: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/57.jpg)
UIViewControllerTransitioningDelegateCustom Transitions
@protocol UIViewControllerTransitioningDelegate <NSObject>@optional- (id <UIViewControllerAnimatedTransitioning>) animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source;
- (id <UIViewControllerAnimatedTransitioning>) animationControllerForDismissedController:(UIViewController *)dismissed;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation: (id <UIViewControllerAnimatedTransitioning>)animator;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal: (id <UIViewControllerAnimatedTransitioning>)animator;@end
![Page 58: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/58.jpg)
UIViewControllerTransitioningDelegateCustom Transitions
@protocol UIViewControllerTransitioningDelegate <NSObject>@optional- (id <UIViewControllerAnimatedTransitioning>) animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source;
- (id <UIViewControllerAnimatedTransitioning>) animationControllerForDismissedController:(UIViewController *)dismissed;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation: (id <UIViewControllerAnimatedTransitioning>)animator;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal: (id <UIViewControllerAnimatedTransitioning>)animator;@end
![Page 59: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/59.jpg)
UIViewControllerTransitioningDelegateCustom Transitions
@protocol UIViewControllerTransitioningDelegate <NSObject>@optional- (id <UIViewControllerAnimatedTransitioning>) animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source;
- (id <UIViewControllerAnimatedTransitioning>) animationControllerForDismissedController:(UIViewController *)dismissed;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation: (id <UIViewControllerAnimatedTransitioning>)animator;
- (id <UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal: (id <UIViewControllerAnimatedTransitioning>)animator;@end
![Page 60: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/60.jpg)
UIViewControllerAnimatedTransitioningCustom Transitions
@protocol UIViewControllerAnimatedTransitioning <NSObject>
- (NSTimeInterval)transitionDuration: (id <UIViewControllerContextTransitioning>)transitionContext;
- (void)animateTransition: (id <UIViewControllerContextTransitioning>)transitionContext;
@optional- (void)animationEnded:(BOOL) transitionCompleted;
@end
![Page 61: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/61.jpg)
UIViewControllerInteractiveTransitioningCustom Transitions
@protocol UIViewControllerInteractiveTransitioning <NSObject>
- (void)startInteractiveTransition: (id <UIViewControllerContextTransitioning>)transitionContext;
@optional- (CGFloat)completionSpeed;- (UIViewAnimationCurve)completionCurve;
@end
![Page 62: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/62.jpg)
UIViewControllerContextTransitioningCustom Transitions
@protocol UIViewControllerContextTransitioning <NSObject>- (UIView *)containerView;- (BOOL)isAnimated;- (BOOL)isInteractive;- (BOOL)transitionWasCancelled;- (UIModalPresentationStyle)presentationStyle;- (void)updateInteractiveTransition:(CGFloat)percentComplete;- (void)finishInteractiveTransition;- (void)cancelInteractiveTransition;- (void)completeTransition:(BOOL)didComplete;- (UIViewController *)viewControllerForKey:(NSString *)key;- (CGRect)initialFrameForViewController:(UIViewController *)vc;- (CGRect)finalFrameForViewController:(UIViewController *)vc;@end
![Page 63: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/63.jpg)
UIViewControllerContextTransitioningCustom Transitions
@protocol UIViewControllerContextTransitioning <NSObject>- (UIView *)containerView;- (BOOL)isAnimated;- (BOOL)isInteractive;- (BOOL)transitionWasCancelled;- (UIModalPresentationStyle)presentationStyle;- (void)updateInteractiveTransition:(CGFloat)percentComplete;- (void)finishInteractiveTransition;- (void)cancelInteractiveTransition;- (void)completeTransition:(BOOL)didComplete;- (UIViewController *)viewControllerForKey:(NSString *)key;- (CGRect)initialFrameForViewController:(UIViewController *)vc;- (CGRect)finalFrameForViewController:(UIViewController *)vc;@end
![Page 64: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/64.jpg)
UIViewControllerContextTransitioningCustom Transitions
@protocol UIViewControllerContextTransitioning <NSObject>- (UIView *)containerView;- (BOOL)isAnimated;- (BOOL)isInteractive;- (BOOL)transitionWasCancelled;- (UIModalPresentationStyle)presentationStyle;- (void)updateInteractiveTransition:(CGFloat)percentComplete;- (void)finishInteractiveTransition;- (void)cancelInteractiveTransition;- (void)completeTransition:(BOOL)didComplete;- (UIViewController *)viewControllerForKey:(NSString *)key;- (CGRect)initialFrameForViewController:(UIViewController *)vc;- (CGRect)finalFrameForViewController:(UIViewController *)vc;@end
![Page 65: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/65.jpg)
UIViewControllerContextTransitioningCustom Transitions
@protocol UIViewControllerContextTransitioning <NSObject>- (UIView *)containerView;- (BOOL)isAnimated;- (BOOL)isInteractive;- (BOOL)transitionWasCancelled;- (UIModalPresentationStyle)presentationStyle;- (void)updateInteractiveTransition:(CGFloat)percentComplete;- (void)finishInteractiveTransition;- (void)cancelInteractiveTransition;- (void)completeTransition:(BOOL)didComplete;- (UIViewController *)viewControllerForKey:(NSString *)key;- (CGRect)initialFrameForViewController:(UIViewController *)vc;- (CGRect)finalFrameForViewController:(UIViewController *)vc;@end
![Page 66: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/66.jpg)
UIViewControllerContextTransitioningCustom Transitions
@protocol UIViewControllerContextTransitioning <NSObject>- (UIView *)containerView;- (BOOL)isAnimated;- (BOOL)isInteractive;- (BOOL)transitionWasCancelled;- (UIModalPresentationStyle)presentationStyle;- (void)updateInteractiveTransition:(CGFloat)percentComplete;- (void)finishInteractiveTransition;- (void)cancelInteractiveTransition;- (void)completeTransition:(BOOL)didComplete;- (UIViewController *)viewControllerForKey:(NSString *)key;- (CGRect)initialFrameForViewController:(UIViewController *)vc;- (CGRect)finalFrameForViewController:(UIViewController *)vc;@end
Custom Transitions Using View Controllers Pacific HeightsThursday 11:30AM
![Page 67: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/67.jpg)
State Restoration
![Page 68: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/68.jpg)
Ignoring Snapshots
• Called from methods invoked by state restoration:- (void)ignoreSnapshotOnNextApplicationLaunch;
![Page 69: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/69.jpg)
Other Objects
• Non-view and non-view controller objects can now participate+ (void)registerObjectForStateRestoration:(id<UIStateRestoring>)object restorationIdentifier:(NSString *)restorationIdentifier;
![Page 70: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/70.jpg)
Bluetooth State Restoration
• Launch options keysUIKIT_EXTERN NSString *const UIApplicationLaunchOptionsBluetoothCentralsKey;
UIKIT_EXTERN NSString *const UIApplicationLaunchOptionsBluetoothPeripheralsKey;
![Page 71: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/71.jpg)
Bluetooth State Restoration
• Launch options keysUIKIT_EXTERN NSString *const UIApplicationLaunchOptionsBluetoothCentralsKey;
UIKIT_EXTERN NSString *const UIApplicationLaunchOptionsBluetoothPeripheralsKey;
![Page 72: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/72.jpg)
AirDrop
![Page 73: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/73.jpg)
AirDrop
• Adopt UIActivityItemSourceProtocol• Update application’s Info.plist to create, register, and export UTI for custom document formats
• New Documents/Inbox directory■ Check this on app activations■ …even when you didn’t get an -application:openURL:sourceApplication:annotation: call
• May be launched multiple times in quick succession■ Might want to queue work up
![Page 74: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/74.jpg)
Dynamics
![Page 75: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/75.jpg)
Dynamics
• Fluid, responsive animations• Enhances the interactions in your application• Concentration on behaviors
![Page 76: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/76.jpg)
UIDynamicAnimatorDynamics
@interface UIDynamicAnimator: NSObject- (instancetype)initWithReferenceView:(UIView*)view;
- (void)addBehavior:(UIDynamicBehavior *)behavior;- (void)removeBehavior:(UIDynamicBehavior *)behavior;- (void)removeAllBehaviors;
@property (nonatomic, readonly) UIView* referenceView;@property (nonatomic, readonly, copy) NSArray* behaviors;
- (NSArray*)itemsInRect:(CGRect)rect;@property (nonatomic, readonly, getter = isRunning) BOOL running;- (NSTimeInterval)elapsedTime;
@property (nonatomic, assign) id <UIDynamicAnimatorDelegate> delegate;@end
![Page 77: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/77.jpg)
UIDynamicAnimatorDynamics
@interface UIDynamicAnimator: NSObject- (instancetype)initWithReferenceView:(UIView*)view;
- (void)addBehavior:(UIDynamicBehavior *)behavior;- (void)removeBehavior:(UIDynamicBehavior *)behavior;- (void)removeAllBehaviors;
@property (nonatomic, readonly) UIView* referenceView;@property (nonatomic, readonly, copy) NSArray* behaviors;
- (NSArray*)itemsInRect:(CGRect)rect;@property (nonatomic, readonly, getter = isRunning) BOOL running;- (NSTimeInterval)elapsedTime;
@property (nonatomic, assign) id <UIDynamicAnimatorDelegate> delegate;@end
![Page 78: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/78.jpg)
UIDynamicAnimatorDynamics
@interface UIDynamicAnimator: NSObject- (instancetype)initWithReferenceView:(UIView*)view;
- (void)addBehavior:(UIDynamicBehavior *)behavior;- (void)removeBehavior:(UIDynamicBehavior *)behavior;- (void)removeAllBehaviors;
@property (nonatomic, readonly) UIView* referenceView;@property (nonatomic, readonly, copy) NSArray* behaviors;
- (NSArray*)itemsInRect:(CGRect)rect;@property (nonatomic, readonly, getter = isRunning) BOOL running;- (NSTimeInterval)elapsedTime;
@property (nonatomic, assign) id <UIDynamicAnimatorDelegate> delegate;@end
![Page 79: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/79.jpg)
UIDynamicAnimatorDynamics
@interface UIDynamicAnimator: NSObject- (instancetype)initWithReferenceView:(UIView*)view;
- (void)addBehavior:(UIDynamicBehavior *)behavior;- (void)removeBehavior:(UIDynamicBehavior *)behavior;- (void)removeAllBehaviors;
@property (nonatomic, readonly) UIView* referenceView;@property (nonatomic, readonly, copy) NSArray* behaviors;
- (NSArray*)itemsInRect:(CGRect)rect;@property (nonatomic, readonly, getter = isRunning) BOOL running;- (NSTimeInterval)elapsedTime;
@property (nonatomic, assign) id <UIDynamicAnimatorDelegate> delegate;@end
![Page 80: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/80.jpg)
UIDynamicBehaviorDynamics
@interface UIDynamicBehavior : NSObject
- (void)addChildBehavior:(UIDynamicBehavior *)behavior;- (void)removeChildBehavior:(UIDynamicBehavior *)behavior;
@property (nonatomic, readonly, copy) NSArray* childBehaviors;
@property (nonatomic,copy) void (^action)(void);
@end
![Page 81: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/81.jpg)
UIDynamicBehaviorDynamics
@interface UIDynamicBehavior : NSObject
- (void)addChildBehavior:(UIDynamicBehavior *)behavior;- (void)removeChildBehavior:(UIDynamicBehavior *)behavior;
@property (nonatomic, readonly, copy) NSArray* childBehaviors;
@property (nonatomic,copy) void (^action)(void);
@end
![Page 82: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/82.jpg)
Supported behaviorsDynamics
• UIAttachmentBehavior• UICollisionBehavior• UIGravityBehavior• UIPushBehavior• UISnapBehavior• UIDynamicItemBehavior
![Page 83: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/83.jpg)
UIDynamicItemDynamics
@protocol UIDynamicItem <NSObject>
@property (nonatomic, readwrite) CGPoint center;@property (nonatomic, readonly) CGRect bounds;@property (nonatomic, readwrite) CGAffineTransform transform;
@end
![Page 84: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/84.jpg)
UIDynamicItemDynamics
@protocol UIDynamicItem <NSObject>
@property (nonatomic, readwrite) CGPoint center;@property (nonatomic, readonly) CGRect bounds;@property (nonatomic, readwrite) CGAffineTransform transform;
@end
• UIView• UICollectionViewLayoutItem
Advanced Techniques with UIKit Dynamics PresidioThursday 3:15PM
Getting Started with UIKit Dynamics PresidioTuesday 4:30PM
![Page 85: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/85.jpg)
Text
![Page 86: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/86.jpg)
Dynamic type sizingText
![Page 87: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/87.jpg)
Dynamic type sizingText
@property(nonatomic,readonly) NSString *preferredContentSizeCategory;
![Page 88: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/88.jpg)
Dynamic type sizingText
@property(nonatomic,readonly) NSString *preferredContentSizeCategory;
NSString *const UIContentSizeCategoryExtraSmall;NSString *const UIContentSizeCategorySmall;NSString *const UIContentSizeCategoryMedium;NSString *const UIContentSizeCategoryLarge;NSString *const UIContentSizeCategoryExtraLarge;NSString *const UIContentSizeCategoryExtraExtraLarge;NSString *const UIContentSizeCategoryExtraExtraExtraLarge;
![Page 89: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/89.jpg)
Dynamic type sizingText
@property(nonatomic,readonly) NSString *preferredContentSizeCategory;
NSString *const UIContentSizeCategoryDidChangeNotification;NSString *const UIContentSizeCategoryNewValueKey;
![Page 90: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/90.jpg)
UIFontText
• Font scaling based on content size category+ (UIFont *)preferredFontForTextStyle:(NSString *)style;
NSString *const UIFontTextStyleHeadline1;NSString *const UIFontTextStyleHeadline2;NSString *const UIFontTextStyleBody;NSString *const UIFontTextStyleSubheadline1;NSString *const UIFontTextStyleSubheadline2;NSString *const UIFontTextStyleFootnote;NSString *const UIFontTextStyleCaption1;NSString *const UIFontTextStyleCaption2;
![Page 91: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/91.jpg)
UIFontText
• Font scaling based on content size category+ (UIFont *)preferredFontForTextStyle:(NSString *)style;
NSString *const UIFontTextStyleHeadline1;NSString *const UIFontTextStyleHeadline2;NSString *const UIFontTextStyleBody;NSString *const UIFontTextStyleSubheadline1;NSString *const UIFontTextStyleSubheadline2;NSString *const UIFontTextStyleFootnote;NSString *const UIFontTextStyleCaption1;NSString *const UIFontTextStyleCaption2;
![Page 92: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/92.jpg)
![Page 93: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/93.jpg)
Text KitText
• Objective-C API• Inspired by the Cocoa text system from OS X• Wraps Core Text
![Page 94: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/94.jpg)
TextClasses
![Page 95: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/95.jpg)
TextClasses
![Page 96: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/96.jpg)
TextClasses
NSTextContainer
![Page 97: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/97.jpg)
TextClasses
NSTextContainer
NSLayoutManager
![Page 98: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/98.jpg)
NSTextStorage
TextClasses
NSTextContainer
NSLayoutManager
![Page 99: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/99.jpg)
UITextView and NSTextContainerText Kit
- (instancetype)initWithFrame:(CGRect)frame textContainer:(NSTextContainer *)textContainer;
@property (nonatomic,readonly) NSTextContainer *textContainer;
@property(nonatomic,readonly) NSLayoutManager *layoutManager;@property(nonatomic,readonly,retain) NSTextStorage *textStorage;
![Page 100: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/100.jpg)
UITextView and NSTextContainerText Kit
- (instancetype)initWithFrame:(CGRect)frame textContainer:(NSTextContainer *)textContainer;
@property (nonatomic,readonly) NSTextContainer *textContainer;
@property(nonatomic,readonly) NSLayoutManager *layoutManager;@property(nonatomic,readonly,retain) NSTextStorage *textStorage;
![Page 101: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/101.jpg)
NSTextContainerText Kit
@interface NSTextContainer : NSObject <NSCoding, NSTextLayoutOrientationProvider>
- (id)initWithSize:(CGSize)size;@property(assign, NS_NONATOMIC_IOSONLY) NSLayoutManager *layoutManager;
@property(NS_NONATOMIC_IOSONLY) CGSize size;@property(copy, NS_NONATOMIC_IOSONLY) NSArray *exclusionPaths;@property(NS_NONATOMIC_IOSONLY) NSLineBreakMode lineBreakMode;@property(NS_NONATOMIC_IOSONLY) CGFloat lineFragmentPadding;
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(CGRect *)remainingRect;@end
![Page 102: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/102.jpg)
NSTextContainerText Kit
@interface NSTextContainer : NSObject <NSCoding, NSTextLayoutOrientationProvider>
- (id)initWithSize:(CGSize)size;@property(assign, NS_NONATOMIC_IOSONLY) NSLayoutManager *layoutManager;
@property(NS_NONATOMIC_IOSONLY) CGSize size;@property(copy, NS_NONATOMIC_IOSONLY) NSArray *exclusionPaths;@property(NS_NONATOMIC_IOSONLY) NSLineBreakMode lineBreakMode;@property(NS_NONATOMIC_IOSONLY) CGFloat lineFragmentPadding;
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(CGRect *)remainingRect;@end
![Page 103: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/103.jpg)
NSTextContainerText Kit
@interface NSTextContainer : NSObject <NSCoding, NSTextLayoutOrientationProvider>
- (id)initWithSize:(CGSize)size;@property(assign, NS_NONATOMIC_IOSONLY) NSLayoutManager *layoutManager;
@property(NS_NONATOMIC_IOSONLY) CGSize size;@property(copy, NS_NONATOMIC_IOSONLY) NSArray *exclusionPaths;@property(NS_NONATOMIC_IOSONLY) NSLineBreakMode lineBreakMode;@property(NS_NONATOMIC_IOSONLY) CGFloat lineFragmentPadding;
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(CGRect *)remainingRect;@end
![Page 104: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/104.jpg)
NSTextContainerText Kit
@interface NSTextContainer : NSObject <NSCoding, NSTextLayoutOrientationProvider>
- (id)initWithSize:(CGSize)size;@property(assign, NS_NONATOMIC_IOSONLY) NSLayoutManager *layoutManager;
@property(NS_NONATOMIC_IOSONLY) CGSize size;@property(copy, NS_NONATOMIC_IOSONLY) NSArray *exclusionPaths;@property(NS_NONATOMIC_IOSONLY) NSLineBreakMode lineBreakMode;@property(NS_NONATOMIC_IOSONLY) CGFloat lineFragmentPadding;
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(CGRect *)remainingRect;@end
![Page 105: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/105.jpg)
NSTextContainerText Kit
@interface NSTextContainer : NSObject <NSCoding, NSTextLayoutOrientationProvider>
- (id)initWithSize:(CGSize)size;@property(assign, NS_NONATOMIC_IOSONLY) NSLayoutManager *layoutManager;
@property(NS_NONATOMIC_IOSONLY) CGSize size;@property(copy, NS_NONATOMIC_IOSONLY) NSArray *exclusionPaths;@property(NS_NONATOMIC_IOSONLY) NSLineBreakMode lineBreakMode;@property(NS_NONATOMIC_IOSONLY) CGFloat lineFragmentPadding;
- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(CGRect *)remainingRect;@end
![Page 106: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/106.jpg)
NSLayoutManager global optionsText Kit
@interface NSLayoutManager : NSObject <NSCoding>…@property(NS_NONATOMIC_IOSONLY) BOOL showsInvisibleCharacters;@property(NS_NONATOMIC_IOSONLY) BOOL showsControlCharacters;@property(NS_NONATOMIC_IOSONLY) CGFloat hyphenationFactor;@property(NS_NONATOMIC_IOSONLY) BOOL usesFontLeading;@property(NS_NONATOMIC_IOSONLY) BOOL allowsNonContiguousLayout;@property(readonly, NS_NONATOMIC_IOSONLY) BOOL hasNonContiguousLayout;…@end
![Page 107: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/107.jpg)
NSLayoutManager featuresText Kit
• Invalidation- (void)invalidateLayoutForCharacterRange:(NSRange)charRange actualCharacterRange:(NSRangePointer)actualCharRange;
• Glyphs and glyph properties@property(readonly, NS_NONATOMIC_IOSONLY) NSUInteger numberOfGlyphs;
- (CGGlyph)glyphAtIndex:(NSUInteger)glyphIndex isValidIndex:(BOOL *)isValidIndex;
- (NSUInteger)getGlyphsInRange:(NSRange)glyphRange glyphs:(CGGlyph *)glyphBuffer properties:(NSGlyphProperty *)props characterIndexes:(NSUInteger *)charIndexBuffer bidiLevels:(unsigned char *)bidiLevelBuffer;
![Page 108: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/108.jpg)
NSLayoutManager featuresText Kit
• Invalidation- (void)invalidateLayoutForCharacterRange:(NSRange)charRange actualCharacterRange:(NSRangePointer)actualCharRange;
• Glyphs and glyph properties@property(readonly, NS_NONATOMIC_IOSONLY) NSUInteger numberOfGlyphs;
- (CGGlyph)glyphAtIndex:(NSUInteger)glyphIndex isValidIndex:(BOOL *)isValidIndex;
- (NSUInteger)getGlyphsInRange:(NSRange)glyphRange glyphs:(CGGlyph *)glyphBuffer properties:(NSGlyphProperty *)props characterIndexes:(NSUInteger *)charIndexBuffer bidiLevels:(unsigned char *)bidiLevelBuffer;
![Page 109: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/109.jpg)
NSLayoutManager featuresText Kit
• Drawing primitives- (void)drawBackgroundForGlyphRange:(NSRange)glyphsToShow atPoint:(CGPoint)origin;
- (void)drawGlyphsForGlyphRange:(NSRange)glyphsToShow atPoint:(CGPoint)origin;
- (void)drawUnderlineForGlyphRange:(NSRange)glyphRange underlineType:(NSUnderlineStyle)underlineVal baselineOffset:(CGFloat)baselineOffset lineFragmentRect:(CGRect)lineRect lineFragmentGlyphRange:(NSRange)lineGlyphRange containerOrigin:(CGPoint)containerOrigin;
![Page 110: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/110.jpg)
Additional classesText Kit
• NSTextAttachment• NSTextStorage
Introducing Text Kit PresidioWednesday 2:00PM
Advanced Text Layouts and Effects with Text Kit MissionThursday 2:00PM
Using Fonts with Text Kit PresidioFriday 9:00AM
![Page 111: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/111.jpg)
More New Features
![Page 112: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/112.jpg)
Multipeer Connectivity
• Local network discovery• Session management• Encrypted sessions• File transfers
Nearby Networking with Multipeer Connectivity MissionWednesday 10:15AM
![Page 113: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/113.jpg)
SpriteKit
• iOS• OS X• High-performance sprite-based game framework
• Image atlas support• UIKit and AppKit integration
Introduction to SpriteKit PresidioWednesday 11:30AM
![Page 114: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/114.jpg)
Game Controllers
• Buttons• Analog joysticks• Multiple controllers
Integrating with Game Controllers Pacific HeightsTuesday 3:15PM
![Page 115: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/115.jpg)
MapKit
• Directions• 3D cameras• Map tile overlays• Map snapshots• Geodesic polylines
What’s New in MapKit PresidioThursday 9:00AM
![Page 116: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/116.jpg)
CoreLocation
• Bluetooth LE beacons■ Advertising■ Ranging
• New region types• Region monitoring
What’s New in Core Location PresidioThursday 11:30AM
![Page 117: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/117.jpg)
Accessibility
• Guided Access API
Accessibility in iOS Pacific HeightsTuesday 9:00AM
![Page 118: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/118.jpg)
GameCenter
• New turn-based game API■ Turns tabs■ Mode for bidding
• Leaderboard improvements• System integrity features
What’s New in Game Center MissionWednesday 3:15PM
![Page 119: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/119.jpg)
Contact informationApple Evangelists
John GeleynseDirector, Technology [email protected]
Mike SternUser Experience [email protected]
Jake BehrensUI Frameworks [email protected]
Paul MarcosApplication Services [email protected]
![Page 120: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/120.jpg)
Contact informationApple Evangelists
Allan SchafferGraphics and Game Technologies [email protected]
Dave DeLongApp Frameworks and Developer Tools [email protected]
Paul DanboldCore OS [email protected]
Eryk VershenMedia Technologies [email protected]
Ernie PrahbakarDeveloper Forums [email protected]
![Page 121: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/121.jpg)
Contact informationApple Evangelists
David HarringtonSenior Manager, Hardware [email protected]
Stephen ChickiPhone [email protected]
Craig KeithleyMFi and I/O Technologies [email protected]
Mark Tozer-VilchezDesktop Technologies [email protected]
![Page 122: What’s New in Cocoa Touch · These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 203 What’s New in Cocoa Touch Chris Parker](https://reader033.vdocuments.us/reader033/viewer/2022041417/5e1cb9890bb1ef1a016cc1c0/html5/thumbnails/122.jpg)