The document provides an overview of changes to UIKit in iOS 7, including:
- Views now extend to the full screen by default underneath bars
- Apps have more control over the status bar through properties like preferredStatusBarStyle
- Tint color is now a property of UIView rather than bars, and is used consistently to indicate interactivity
- Navigation and tab bars are now translucent, and their appearance can be customized through properties like barTintColor
- Buttons are now borderless, and tintColor is used to set normal and selected colors
- Template images are handled through imageWithRenderingMode, and there are new sharing activity types and categories.
6. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
Tuesday, September 3, 13
7. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
Underneath the status bar
Tuesday, September 3, 13
8. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
Tuesday, September 3, 13
9. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
§ wantsFullScreenLayout now deprecated
Tuesday, September 3, 13
10. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
§ wantsFullScreenLayout now deprecated
o
extendedEdgesForLayout can change how far your view extends
Tuesday, September 3, 13
11. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
§ wantsFullScreenLayout now deprecated
o
o
extendedEdgesForLayout can change how far your view extends
Can get iOS6 like behavior
Tuesday, September 3, 13
12. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
§ wantsFullScreenLayout now deprecated
o
o
extendedEdgesForLayout can change how far your view extends
Can get iOS6 like behavior
§ Don’t make changes that could make status bar unreadable
Tuesday, September 3, 13
13. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
§ wantsFullScreenLayout now deprecated
o
o
extendedEdgesForLayout can change how far your view extends
Can get iOS6 like behavior
§ Don’t make changes that could make status bar unreadable
o
New status bar style: UIStatusBarStyleLightContent
Tuesday, September 3, 13
14. Full Screen
§ By default, your top-level views are extended to the full screen height and
width
o
o
Underneath the status bar
Underneath navigation bar (if you are using one)
§ wantsFullScreenLayout now deprecated
o
o
extendedEdgesForLayout can change how far your view extends
Can get iOS6 like behavior
§ Don’t make changes that could make status bar unreadable
o
o
New status bar style: UIStatusBarStyleLightContent
BlackTranslucent and BlackOpaque deprecated
Tuesday, September 3, 13
16. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
Tuesday, September 3, 13
17. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
§ preferredStatusBarStyle property can be overridden
Tuesday, September 3, 13
18. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
§ preferredStatusBarStyle property can be overridden
§ You can call setNeedsStatusBarAppearanceUpdate
Tuesday, September 3, 13
19. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
§ preferredStatusBarStyle property can be overridden
§ You can call setNeedsStatusBarAppearanceUpdate
o
If called during an animation block, the changes will be animated
Tuesday, September 3, 13
20. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
§ preferredStatusBarStyle property can be overridden
§ You can call setNeedsStatusBarAppearanceUpdate
o
If called during an animation block, the changes will be animated
§ prefersStatusBarHidden defaults to NO
Tuesday, September 3, 13
21. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
§ preferredStatusBarStyle property can be overridden
§ You can call setNeedsStatusBarAppearanceUpdate
o
If called during an animation block, the changes will be animated
§ prefersStatusBarHidden defaults to NO
o
You can set to yes
Tuesday, September 3, 13
22. Status Bar
§ Besides making sure not to obfuscate the status bar, apps have more
control over it in iOS7 through UIViewController
§ preferredStatusBarStyle property can be overridden
§ You can call setNeedsStatusBarAppearanceUpdate
o
If called during an animation block, the changes will be animated
§ prefersStatusBarHidden defaults to NO
o
o
You can set to yes
preferredStatusBarUpdateAnimation kicks in if it changes
Tuesday, September 3, 13
24. Tint Color
§ Property used to be available on bars, now on UIView
Tuesday, September 3, 13
25. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
Tuesday, September 3, 13
26. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
§ Tint color now used consistently through an app to indicate interactivity
of an element
Tuesday, September 3, 13
27. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
§ Tint color now used consistently through an app to indicate interactivity
of an element
o
Rather than a certain chrome on an item
Tuesday, September 3, 13
28. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
§ Tint color now used consistently through an app to indicate interactivity
of an element
o
Rather than a certain chrome on an item
§ Each app is free to pick its own tint color
Tuesday, September 3, 13
29. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
§ Tint color now used consistently through an app to indicate interactivity
of an element
o
Rather than a certain chrome on an item
§ Each app is free to pick its own tint color
o
Default is new iOS7 blue color
Tuesday, September 3, 13
30. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
§ Tint color now used consistently through an app to indicate interactivity
of an element
o
Rather than a certain chrome on an item
§ Each app is free to pick its own tint color
o
Default is new iOS7 blue color
§ Tint color is now inherited from the top-level view down
Tuesday, September 3, 13
31. Tint Color
§ Property used to be available on bars, now on UIView
o
Not the same as iOS6 version
§ Tint color now used consistently through an app to indicate interactivity
of an element
o
Rather than a certain chrome on an item
§ Each app is free to pick its own tint color
o
Default is new iOS7 blue color
§ Tint color is now inherited from the top-level view down
o
Each UIView can change if desired, but a consistent tint color helps users understand
what is interactive (clickable, touchable) in your app
Tuesday, September 3, 13
33. Tab and Navigation Bars
§ tintColor no longer has the same effect
Tuesday, September 3, 13
34. Tab and Navigation Bars
§ tintColor no longer has the same effect
o
If you want to change the bar background color use barTintColor
Tuesday, September 3, 13
35. Tab and Navigation Bars
§ tintColor no longer has the same effect
o
If you want to change the bar background color use barTintColor
§ Size of tab and navigation bars has changed
Tuesday, September 3, 13
36. Tab and Navigation Bars
§ tintColor no longer has the same effect
o
If you want to change the bar background color use barTintColor
§ Size of tab and navigation bars has changed
o
Again, best to use Auto Layout expressions to avoid hardcoded values
Tuesday, September 3, 13
39. Navigation Bar
§ Now translucent
o
Again your View will generally appear below the nav bar on scroll
Tuesday, September 3, 13
40. Navigation Bar
§ Now translucent
o
Again your View will generally appear below the nav bar on scroll
§ You can change the backIndicatorImage
Tuesday, September 3, 13
41. Navigation Bar
§ Now translucent
o
Again your View will generally appear below the nav bar on scroll
§ You can change the backIndicatorImage
o
backIndicatorTransitionMaskImage is used during push and pop transitions
Tuesday, September 3, 13
42. Navigation Bar
§ Now translucent
o
Again your View will generally appear below the nav bar on scroll
§ You can change the backIndicatorImage
o
o
backIndicatorTransitionMaskImage is used during push and pop transitions
Generally you’ll change both of them
Tuesday, September 3, 13
43. Navigation Bar
§ Now translucent
o
Again your View will generally appear below the nav bar on scroll
§ You can change the backIndicatorImage
o
o
backIndicatorTransitionMaskImage is used during push and pop transitions
Generally you’ll change both of them
§ displaysSearchBarInNavigationBar
Tuesday, September 3, 13
44. Navigation Bar
§ Now translucent
o
Again your View will generally appear below the nav bar on scroll
§ You can change the backIndicatorImage
o
o
backIndicatorTransitionMaskImage is used during push and pop transitions
Generally you’ll change both of them
§ displaysSearchBarInNavigationBar
o
Puts the search bar in NavigationBar rather than at top of TableView
Tuesday, September 3, 13
47. Button
§ Buttons are now borderless and bezel-less
o
UIButtonTypeSystem new default button type
Tuesday, September 3, 13
48. Button
§ Buttons are now borderless and bezel-less
o
UIButtonTypeSystem new default button type
§ TintColor used to set normal and selected color
Tuesday, September 3, 13
51. UIImage
§ Template images are now taken care of by UIKit
o
Call imageWithRenderingMode to specify template behavior
Tuesday, September 3, 13
52. UIImage
§ Template images are now taken care of by UIKit
o
o
Call imageWithRenderingMode to specify template behavior
UIImageRenderingModeAlwaysTemplate
Tuesday, September 3, 13
53. UIImage
§ Template images are now taken care of by UIKit
o
o
o
Call imageWithRenderingMode to specify template behavior
UIImageRenderingModeAlwaysTemplate
UIImageRenderingModeAlwaysOriginal
Tuesday, September 3, 13
54. UIImage
§ Template images are now taken care of by UIKit
o
o
o
o
Call imageWithRenderingMode to specify template behavior
UIImageRenderingModeAlwaysTemplate
UIImageRenderingModeAlwaysOriginal
UIImageRenderingModeAutomatic (default) – will template or not based on context
Tuesday, September 3, 13
67. TableView
§ Major change: in grouped style, cells now extend to edge
o
Larger space between sections
Tuesday, September 3, 13
68. TableView
§ Major change: in grouped style, cells now extend to edge
o
o
Larger space between sections
Darker background
Tuesday, September 3, 13
69. TableView
§ Major change: in grouped style, cells now extend to edge
o
o
Larger space between sections
Darker background
§ Highlighted cells
Tuesday, September 3, 13
70. TableView
§ Major change: in grouped style, cells now extend to edge
o
o
Larger space between sections
Darker background
§ Highlighted cells
o
Gray instead of blue background – no color inversion – or use
selectedBackgroundView to create custom view on selection
Tuesday, September 3, 13
71. TableView
§ Major change: in grouped style, cells now extend to edge
o
o
Larger space between sections
Darker background
§ Highlighted cells
o
o
Gray instead of blue background – no color inversion – or use
selectedBackgroundView to create custom view on selection
Separators are inset
Tuesday, September 3, 13
72. TableView
§ Major change: in grouped style, cells now extend to edge
o
o
Larger space between sections
Darker background
§ Highlighted cells
o
o
Gray instead of blue background – no color inversion – or use
selectedBackgroundView to create custom view on selection
Separators are inset
§ Estimated height API
Tuesday, September 3, 13
73. TableView
§ Major change: in grouped style, cells now extend to edge
o
o
Larger space between sections
Darker background
§ Highlighted cells
o
o
Gray instead of blue background – no color inversion – or use
selectedBackgroundView to create custom view on selection
Separators are inset
§ Estimated height API
o
You can now “prime” the table view with an estimated height before cells are
requested
Tuesday, September 3, 13
76. UIScrollView
§ Small but powerful change: keyboardDismiss property
o
UIScrollViewKeyboardDismissModeOnDrag is my favorite – when you have a form in a
scroll view, scrolling dismisses the keyboard!
Tuesday, September 3, 13
79. Other Controls
§ Segmented controls
o
UISegmentedControlStyle deprecated, it has no effect
Tuesday, September 3, 13
80. Other Controls
§ Segmented controls
o
UISegmentedControlStyle deprecated, it has no effect
§ Switches and sliders: slight metrics change
Tuesday, September 3, 13
81. Other Controls
§ Segmented controls
o
UISegmentedControlStyle deprecated, it has no effect
§ Switches and sliders: slight metrics change
o
Again, Auto Layout is your friend here
Tuesday, September 3, 13
84. Animations
§ iOS7 supports custom animations when moving between Views
o
New ”animate with” methods enable both built-in as well as custom keyframe
animations
Tuesday, September 3, 13
85. Animations
§ iOS7 supports custom animations when moving between Views
o
New ”animate with” methods enable both built-in as well as custom keyframe
animations
§ Also supports opting out of any potential animations
Tuesday, September 3, 13
86. Animations
§ iOS7 supports custom animations when moving between Views
o
New ”animate with” methods enable both built-in as well as custom keyframe
animations
§ Also supports opting out of any potential animations
o
[UIView performWithoutAnimation] takes a block that will guaranteed to execute
without any animations
Tuesday, September 3, 13
87. Animations
§ iOS7 supports custom animations when moving between Views
o
New ”animate with” methods enable both built-in as well as custom keyframe
animations
§ Also supports opting out of any potential animations
o
o
[UIView performWithoutAnimation] takes a block that will guaranteed to execute
without any animations
Usually for performance reasons
Tuesday, September 3, 13
89. Custom Transitions
§ iOS7 makes it easy to provide custom animations during ViewController
transitions
Tuesday, September 3, 13
90. Custom Transitions
§ iOS7 makes it easy to provide custom animations during ViewController
transitions
§ Implement UIViewControllerTransitioningDelegate to get control
Tuesday, September 3, 13
92. CollectionViews
§ Its always been possible to animate layout changes inside of a
CollectionView
Tuesday, September 3, 13
93. CollectionViews
§ Its always been possible to animate layout changes inside of a
CollectionView
o
New method has completion block
Tuesday, September 3, 13
94. CollectionViews
§ Its always been possible to animate layout changes inside of a
CollectionView
o
New method has completion block
§ You can customize the layout-to-layout transitions using a
UICollectionViewTransitionLayout subclass
Tuesday, September 3, 13
95. CollectionViews
§ Its always been possible to animate layout changes inside of a
CollectionView
o
New method has completion block
§ You can customize the layout-to-layout transitions using a
UICollectionViewTransitionLayout subclass
§ Layout-to-layout navigation controller pushes now possible
Tuesday, September 3, 13
96. CollectionViews
§ Its always been possible to animate layout changes inside of a
CollectionView
o
New method has completion block
§ You can customize the layout-to-layout transitions using a
UICollectionViewTransitionLayout subclass
§ Layout-to-layout navigation controller pushes now possible
o
useLayoutToLayoutNavigationTransitions must be set to NO on the current Collection
View Controller
Tuesday, September 3, 13
97. CollectionViews
§ Its always been possible to animate layout changes inside of a
CollectionView
o
New method has completion block
§ You can customize the layout-to-layout transitions using a
UICollectionViewTransitionLayout subclass
§ Layout-to-layout navigation controller pushes now possible
o
o
useLayoutToLayoutNavigationTransitions must be set to NO on the current Collection
View Controller
useLayoutToLayoutNavigationTransitions must be set to YES on the pushed Collection
View Controller
Tuesday, September 3, 13
99. Motion
§ Part of the look of the new OS is related to depth and motion
Tuesday, September 3, 13
100. Motion
§ Part of the look of the new OS is related to depth and motion
o
Springboard has a parallax effect behind it
Tuesday, September 3, 13
101. Motion
§ Part of the look of the new OS is related to depth and motion
o
Springboard has a parallax effect behind it
§ Alerts move as your position moves
Tuesday, September 3, 13
102. Motion
§ Part of the look of the new OS is related to depth and motion
o
Springboard has a parallax effect behind it
§ Alerts move as your position moves
o
Best seen in Safari multiple-page views
Tuesday, September 3, 13
103. Motion
§ Part of the look of the new OS is related to depth and motion
o
Springboard has a parallax effect behind it
§ Alerts move as your position moves
o
Best seen in Safari multiple-page views
§ UIMotionBehavior is the main class in the new API
Tuesday, September 3, 13
107. Motion Effects
§ UIMotionEffect is the super class
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Tuesday, September 3, 13
108. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
Tuesday, September 3, 13
109. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
Tuesday, September 3, 13
110. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
o
Give it a keypath and a min and max value
Tuesday, September 3, 13
111. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
o
o
Give it a keypath and a min and max value
Add it to any UIView – addMotionEffect
Tuesday, September 3, 13
112. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
o
o
o
Give it a keypath and a min and max value
Add it to any UIView – addMotionEffect
Use the new motionEffects property to find out what effects are applied to a view
Tuesday, September 3, 13
113. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
o
o
o
o
Give it a keypath and a min and max value
Add it to any UIView – addMotionEffect
Use the new motionEffects property to find out what effects are applied to a view
removeMotionEffect to remove
Tuesday, September 3, 13
114. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
o
o
o
o
Give it a keypath and a min and max value
Add it to any UIView – addMotionEffect
Use the new motionEffects property to find out what effects are applied to a view
removeMotionEffect to remove
§ UIMotionEffectGroup holds collection
Tuesday, September 3, 13
115. Motion Effects
§ UIMotionEffect is the super class
o
o
o
You can subclass for your own effects
You are passed the UIOffset which tells you the vertical/horizontal offset motion of
the device
Return a dictionary of keypaths and relative values for that offset
§ Rather than subclassing, you can use UIInterpolatingMotionEffect
o
o
o
o
Give it a keypath and a min and max value
Add it to any UIView – addMotionEffect
Use the new motionEffects property to find out what effects are applied to a view
removeMotionEffect to remove
§ UIMotionEffectGroup holds collection
o
Use UIMotionEffect subclass so you can add to [UIView addMotionEffect]
Tuesday, September 3, 13
118. Dynamics
§ Slide to get camera on lock screen
o
Bounces and hits bottom of screen
Tuesday, September 3, 13
119. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
Tuesday, September 3, 13
120. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
§ Messages scroll a bit behind your finger
Tuesday, September 3, 13
121. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
§ Messages scroll a bit behind your finger
§ Implemented by UIDynamics
Tuesday, September 3, 13
122. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
§ Messages scroll a bit behind your finger
§ Implemented by UIDynamics
o
A physics engine built into UIKit
Tuesday, September 3, 13
123. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
§ Messages scroll a bit behind your finger
§ Implemented by UIDynamics
o
A physics engine built into UIKit
§ Create a behavior
Tuesday, September 3, 13
124. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
§ Messages scroll a bit behind your finger
§ Implemented by UIDynamics
o
A physics engine built into UIKit
§ Create a behavior
o
Configure with items to animate
Tuesday, September 3, 13
125. Dynamics
§ Slide to get camera on lock screen
o
o
Bounces and hits bottom of screen
Simulated weight
§ Messages scroll a bit behind your finger
§ Implemented by UIDynamics
o
A physics engine built into UIKit
§ Create a behavior
o
o
Configure with items to animate
Add it to the view
Tuesday, September 3, 13
128. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
Tuesday, September 3, 13
129. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
Tuesday, September 3, 13
130. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
Tuesday, September 3, 13
131. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
Tuesday, September 3, 13
132. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
Models gravity
Tuesday, September 3, 13
133. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
Tuesday, September 3, 13
134. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
§ UIPushBehavior
Tuesday, September 3, 13
135. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
§ UIPushBehavior
o
Apply forces to views
Tuesday, September 3, 13
136. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
§ UIPushBehavior
o
Apply forces to views
§ UISnapBehavior
Tuesday, September 3, 13
137. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
§ UIPushBehavior
o
Apply forces to views
§ UISnapBehavior
o
Snap to point
Tuesday, September 3, 13
138. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
§ UIPushBehavior
o
Apply forces to views
§ UISnapBehavior
o
Snap to point
§ UIDynamicItemBehavior
Tuesday, September 3, 13
139. Dynamics API Behaviors
§ UIAttachmentBehavior
o
Attaches two views together
§ UICollisionBehavior
o
Models collision with views or boundaries
§ UIGravityBehavior
o
o
Models gravity
1000 points per second per second instead of Earth’s 9.8m per second per second
§ UIPushBehavior
o
Apply forces to views
§ UISnapBehavior
o
Snap to point
§ UIDynamicItemBehavior
o
Access to low-level properties of an item in Dynamics
Tuesday, September 3, 13
141. State Restoration
§ You can now register arbitrary objects to be part of state restoration
Tuesday, September 3, 13
142. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
Tuesday, September 3, 13
143. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
Tuesday, September 3, 13
144. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
Tuesday, September 3, 13
145. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
iOS7 will use Snapshot on launch
Tuesday, September 3, 13
146. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
o
iOS7 will use Snapshot on launch
ignoreSnapshotOnNextApplicationLaunch
Tuesday, September 3, 13
147. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
o
iOS7 will use Snapshot on launch
ignoreSnapshotOnNextApplicationLaunch
§ Other enhancements
Tuesday, September 3, 13
148. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
o
iOS7 will use Snapshot on launch
ignoreSnapshotOnNextApplicationLaunch
§ Other enhancements
o
System Version/Timestamp keys
Tuesday, September 3, 13
149. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
o
iOS7 will use Snapshot on launch
ignoreSnapshotOnNextApplicationLaunch
§ Other enhancements
o
o
System Version/Timestamp keys
Improved UITableView support
Tuesday, September 3, 13
150. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
o
iOS7 will use Snapshot on launch
ignoreSnapshotOnNextApplicationLaunch
§ Other enhancements
o
o
o
System Version/Timestamp keys
Improved UITableView support
UICollectionView support
Tuesday, September 3, 13
151. State Restoration
§ You can now register arbitrary objects to be part of state restoration
o
[UIApplication registerObjectForStateRestoration:restorationIdentifier:]
o
Implement UIStateRestoration protocol
§ Snapshot handling
o
o
iOS7 will use Snapshot on launch
ignoreSnapshotOnNextApplicationLaunch
§ Other enhancements
o
o
o
o
System Version/Timestamp keys
Improved UITableView support
UICollectionView support
Mail Activity Controller
Tuesday, September 3, 13
153. Summary
§ To implement the UI changes in iOS7, Apple invested a considerable of
amount of work in UIKit
Tuesday, September 3, 13
154. Summary
§ To implement the UI changes in iOS7, Apple invested a considerable of
amount of work in UIKit
§ Upside for developers is that creating interactive, engaging UIs is now
even easier
Tuesday, September 3, 13