3 whats-new-in-ios7-m3-uikit-slides

154
Jon Flanders @jonanders What’s New in iOS7 UIKit Tuesday, September 3, 13

Transcript of 3 whats-new-in-ios7-m3-uikit-slides

Page 1: 3 whats-new-in-ios7-m3-uikit-slides

Jon Flanders@jon!anders

What’s New in iOS7UIKit

Tuesday, September 3, 13

Page 2: 3 whats-new-in-ios7-m3-uikit-slides

What You will Learn

Tuesday, September 3, 13

Page 3: 3 whats-new-in-ios7-m3-uikit-slides

What You will Learn

§ Details about the new UIView layout in iOS7

Tuesday, September 3, 13

Page 4: 3 whats-new-in-ios7-m3-uikit-slides

What You will Learn

§ Details about the new UIView layout in iOS7§ Overview of other features

Tuesday, September 3, 13

Page 5: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

Tuesday, September 3, 13

Page 6: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and width

Tuesday, September 3, 13

Page 7: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar

Tuesday, September 3, 13

Page 8: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

Tuesday, September 3, 13

Page 9: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

§ wantsFullScreenLayout now deprecated

Tuesday, September 3, 13

Page 10: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

§ wantsFullScreenLayout now deprecatedo extendedEdgesForLayout can change how far your view extends

Tuesday, September 3, 13

Page 11: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

§ wantsFullScreenLayout now deprecatedo extendedEdgesForLayout can change how far your view extendso Can get iOS6 like behavior

Tuesday, September 3, 13

Page 12: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

§ wantsFullScreenLayout now deprecatedo extendedEdgesForLayout can change how far your view extendso Can get iOS6 like behavior

§ Don’t make changes that could make status bar unreadable

Tuesday, September 3, 13

Page 13: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

§ wantsFullScreenLayout now deprecatedo extendedEdgesForLayout can change how far your view extendso Can get iOS6 like behavior

§ Don’t make changes that could make status bar unreadableo New status bar style: UIStatusBarStyleLightContent

Tuesday, September 3, 13

Page 14: 3 whats-new-in-ios7-m3-uikit-slides

Full Screen

§ By default, your top-level views are extended to the full screen height and widtho Underneath the status bar o Underneath navigation bar (if you are using one)

§ wantsFullScreenLayout now deprecatedo extendedEdgesForLayout can change how far your view extendso Can get iOS6 like behavior

§ Don’t make changes that could make status bar unreadableo New status bar style: UIStatusBarStyleLightContento BlackTranslucent and BlackOpaque deprecated

Tuesday, September 3, 13

Page 15: 3 whats-new-in-ios7-m3-uikit-slides

Status Bar

Tuesday, September 3, 13

Page 16: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 17: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 18: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 19: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 20: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 21: 3 whats-new-in-ios7-m3-uikit-slides

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 NOo You can set to yes

Tuesday, September 3, 13

Page 22: 3 whats-new-in-ios7-m3-uikit-slides

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 NOo You can set to yeso preferredStatusBarUpdateAnimation kicks in if it changes

Tuesday, September 3, 13

Page 23: 3 whats-new-in-ios7-m3-uikit-slides

Tint Color

Tuesday, September 3, 13

Page 24: 3 whats-new-in-ios7-m3-uikit-slides

Tint Color

§ Property used to be available on bars, now on UIView

Tuesday, September 3, 13

Page 25: 3 whats-new-in-ios7-m3-uikit-slides

Tint Color

§ Property used to be available on bars, now on UIView o Not the same as iOS6 version

Tuesday, September 3, 13

Page 26: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 27: 3 whats-new-in-ios7-m3-uikit-slides

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 elemento Rather than a certain chrome on an item

Tuesday, September 3, 13

Page 28: 3 whats-new-in-ios7-m3-uikit-slides

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 elemento Rather than a certain chrome on an item

§ Each app is free to pick its own tint color

Tuesday, September 3, 13

Page 29: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 30: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 31: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 32: 3 whats-new-in-ios7-m3-uikit-slides

Tab and Navigation Bars

Tuesday, September 3, 13

Page 33: 3 whats-new-in-ios7-m3-uikit-slides

Tab and Navigation Bars

§ tintColor no longer has the same effect

Tuesday, September 3, 13

Page 34: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 35: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 36: 3 whats-new-in-ios7-m3-uikit-slides

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 changedo Again, best to use Auto Layout expressions to avoid hardcoded values

Tuesday, September 3, 13

Page 37: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

Tuesday, September 3, 13

Page 38: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucent

Tuesday, September 3, 13

Page 39: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucento Again your View will generally appear below the nav bar on scroll

Tuesday, September 3, 13

Page 40: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucento Again your View will generally appear below the nav bar on scroll

§ You can change the backIndicatorImage

Tuesday, September 3, 13

Page 41: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucento Again your View will generally appear below the nav bar on scroll

§ You can change the backIndicatorImageo backIndicatorTransitionMaskImage is used during push and pop transitions

Tuesday, September 3, 13

Page 42: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucento Again your View will generally appear below the nav bar on scroll

§ You can change the backIndicatorImageo backIndicatorTransitionMaskImage is used during push and pop transitionso Generally you’ll change both of them

Tuesday, September 3, 13

Page 43: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucento Again your View will generally appear below the nav bar on scroll

§ You can change the backIndicatorImageo backIndicatorTransitionMaskImage is used during push and pop transitionso Generally you’ll change both of them

§ displaysSearchBarInNavigationBar

Tuesday, September 3, 13

Page 44: 3 whats-new-in-ios7-m3-uikit-slides

Navigation Bar

§ Now translucento Again your View will generally appear below the nav bar on scroll

§ You can change the backIndicatorImageo backIndicatorTransitionMaskImage is used during push and pop transitionso Generally you’ll change both of them

§ displaysSearchBarInNavigationBaro Puts the search bar in NavigationBar rather than at top of TableView

Tuesday, September 3, 13

Page 45: 3 whats-new-in-ios7-m3-uikit-slides

Button

Tuesday, September 3, 13

Page 46: 3 whats-new-in-ios7-m3-uikit-slides

Button

§ Buttons are now borderless and bezel-less

Tuesday, September 3, 13

Page 47: 3 whats-new-in-ios7-m3-uikit-slides

Button

§ Buttons are now borderless and bezel-lesso UIButtonTypeSystem new default button type

Tuesday, September 3, 13

Page 48: 3 whats-new-in-ios7-m3-uikit-slides

Button

§ Buttons are now borderless and bezel-lesso UIButtonTypeSystem new default button type

§ TintColor used to set normal and selected color

Tuesday, September 3, 13

Page 49: 3 whats-new-in-ios7-m3-uikit-slides

UIImage

Tuesday, September 3, 13

Page 50: 3 whats-new-in-ios7-m3-uikit-slides

UIImage

§ Template images are now taken care of by UIKit

Tuesday, September 3, 13

Page 51: 3 whats-new-in-ios7-m3-uikit-slides

UIImage

§ Template images are now taken care of by UIKito Call imageWithRenderingMode to specify template behavior

Tuesday, September 3, 13

Page 52: 3 whats-new-in-ios7-m3-uikit-slides

UIImage

§ Template images are now taken care of by UIKito Call imageWithRenderingMode to specify template behavioro UIImageRenderingModeAlwaysTemplate

Tuesday, September 3, 13

Page 53: 3 whats-new-in-ios7-m3-uikit-slides

UIImage

§ Template images are now taken care of by UIKito Call imageWithRenderingMode to specify template behavioro UIImageRenderingModeAlwaysTemplateo UIImageRenderingModeAlwaysOriginal

Tuesday, September 3, 13

Page 54: 3 whats-new-in-ios7-m3-uikit-slides

UIImage

§ Template images are now taken care of by UIKito Call imageWithRenderingMode to specify template behavioro UIImageRenderingModeAlwaysTemplateo UIImageRenderingModeAlwaysOriginal o UIImageRenderingModeAutomatic (default) – will template or not based on context

Tuesday, September 3, 13

Page 55: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

Tuesday, September 3, 13

Page 56: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Types

Tuesday, September 3, 13

Page 57: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList

Tuesday, September 3, 13

Page 58: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickr

Tuesday, September 3, 13

Page 59: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickro UIActivityTypePostToVimeo

Tuesday, September 3, 13

Page 60: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickro UIActivityTypePostToVimeoo UIActivityTypePostToTencentWeibo

Tuesday, September 3, 13

Page 61: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickro UIActivityTypePostToVimeoo UIActivityTypePostToTencentWeiboo UIActivityTypeAirDrop

Tuesday, September 3, 13

Page 62: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickro UIActivityTypePostToVimeoo UIActivityTypePostToTencentWeiboo UIActivityTypeAirDrop

§ New enum: UIActivityCategory

Tuesday, September 3, 13

Page 63: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickro UIActivityTypePostToVimeoo UIActivityTypePostToTencentWeiboo UIActivityTypeAirDrop

§ New enum: UIActivityCategoryo UIActivityCategoryShare – Facebook, Twitter, etc.

Tuesday, September 3, 13

Page 64: 3 whats-new-in-ios7-m3-uikit-slides

UIActivity

§ New Activity Typeso UIActivityTypeAddToReadingList o UIActivityTypePostToFlickro UIActivityTypePostToVimeoo UIActivityTypePostToTencentWeiboo UIActivityTypeAirDrop

§ New enum: UIActivityCategoryo UIActivityCategoryShare – Facebook, Twitter, etc.o UIActivityCategoryAction – AirDrop

Tuesday, September 3, 13

Page 65: 3 whats-new-in-ios7-m3-uikit-slides

TableView

Tuesday, September 3, 13

Page 66: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edge

Tuesday, September 3, 13

Page 67: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sections

Tuesday, September 3, 13

Page 68: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sectionso Darker background

Tuesday, September 3, 13

Page 69: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sectionso Darker background

§ Highlighted cells

Tuesday, September 3, 13

Page 70: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sectionso Darker background

§ Highlighted cellso Gray instead of blue background – no color inversion – or use

selectedBackgroundView to create custom view on selection

Tuesday, September 3, 13

Page 71: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sectionso Darker background

§ Highlighted cellso Gray instead of blue background – no color inversion – or use

selectedBackgroundView to create custom view on selectiono Separators are inset

Tuesday, September 3, 13

Page 72: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sectionso Darker background

§ Highlighted cellso Gray instead of blue background – no color inversion – or use

selectedBackgroundView to create custom view on selectiono Separators are inset

§ Estimated height API

Tuesday, September 3, 13

Page 73: 3 whats-new-in-ios7-m3-uikit-slides

TableView

§ Major change: in grouped style, cells now extend to edgeo Larger space between sectionso Darker background

§ Highlighted cellso Gray instead of blue background – no color inversion – or use

selectedBackgroundView to create custom view on selectiono Separators are inset

§ Estimated height APIo You can now “prime” the table view with an estimated height before cells are

requested

Tuesday, September 3, 13

Page 74: 3 whats-new-in-ios7-m3-uikit-slides

UIScrollView

Tuesday, September 3, 13

Page 75: 3 whats-new-in-ios7-m3-uikit-slides

UIScrollView

§ Small but powerful change: keyboardDismiss property

Tuesday, September 3, 13

Page 76: 3 whats-new-in-ios7-m3-uikit-slides

UIScrollView

§ Small but powerful change: keyboardDismiss propertyo UIScrollViewKeyboardDismissModeOnDrag is my favorite – when you have a form in a

scroll view, scrolling dismisses the keyboard!

Tuesday, September 3, 13

Page 77: 3 whats-new-in-ios7-m3-uikit-slides

Other Controls

Tuesday, September 3, 13

Page 78: 3 whats-new-in-ios7-m3-uikit-slides

Other Controls

§ Segmented controls

Tuesday, September 3, 13

Page 79: 3 whats-new-in-ios7-m3-uikit-slides

Other Controls

§ Segmented controls o UISegmentedControlStyle deprecated, it has no effect

Tuesday, September 3, 13

Page 80: 3 whats-new-in-ios7-m3-uikit-slides

Other Controls

§ Segmented controls o UISegmentedControlStyle deprecated, it has no effect

§ Switches and sliders: slight metrics change

Tuesday, September 3, 13

Page 81: 3 whats-new-in-ios7-m3-uikit-slides

Other Controls

§ Segmented controls o UISegmentedControlStyle deprecated, it has no effect

§ Switches and sliders: slight metrics changeo Again, Auto Layout is your friend here

Tuesday, September 3, 13

Page 82: 3 whats-new-in-ios7-m3-uikit-slides

Animations

Tuesday, September 3, 13

Page 83: 3 whats-new-in-ios7-m3-uikit-slides

Animations

§ iOS7 supports custom animations when moving between Views

Tuesday, September 3, 13

Page 84: 3 whats-new-in-ios7-m3-uikit-slides

Animations

§ iOS7 supports custom animations when moving between Viewso New ”animate with” methods enable both built-in as well as custom keyframe

animations

Tuesday, September 3, 13

Page 85: 3 whats-new-in-ios7-m3-uikit-slides

Animations

§ iOS7 supports custom animations when moving between Viewso 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

Page 86: 3 whats-new-in-ios7-m3-uikit-slides

Animations

§ iOS7 supports custom animations when moving between Viewso New ”animate with” methods enable both built-in as well as custom keyframe

animations

§ Also supports opting out of any potential animationso [UIView performWithoutAnimation] takes a block that will guaranteed to execute

without any animations

Tuesday, September 3, 13

Page 87: 3 whats-new-in-ios7-m3-uikit-slides

Animations

§ iOS7 supports custom animations when moving between Viewso New ”animate with” methods enable both built-in as well as custom keyframe

animations

§ Also supports opting out of any potential animationso [UIView performWithoutAnimation] takes a block that will guaranteed to execute

without any animationso Usually for performance reasons

Tuesday, September 3, 13

Page 88: 3 whats-new-in-ios7-m3-uikit-slides

Custom Transitions

Tuesday, September 3, 13

Page 89: 3 whats-new-in-ios7-m3-uikit-slides

Custom Transitions

§ iOS7 makes it easy to provide custom animations during ViewController transitions

Tuesday, September 3, 13

Page 90: 3 whats-new-in-ios7-m3-uikit-slides

Custom Transitions

§ iOS7 makes it easy to provide custom animations during ViewController transitions

§ Implement UIViewControllerTransitioningDelegate to get control

Tuesday, September 3, 13

Page 91: 3 whats-new-in-ios7-m3-uikit-slides

CollectionViews

Tuesday, September 3, 13

Page 92: 3 whats-new-in-ios7-m3-uikit-slides

CollectionViews

§ Its always been possible to animate layout changes inside of a CollectionView

Tuesday, September 3, 13

Page 93: 3 whats-new-in-ios7-m3-uikit-slides

CollectionViews

§ Its always been possible to animate layout changes inside of a CollectionView o New method has completion block

Tuesday, September 3, 13

Page 94: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 95: 3 whats-new-in-ios7-m3-uikit-slides

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

Page 96: 3 whats-new-in-ios7-m3-uikit-slides

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 possibleo useLayoutToLayoutNavigationTransitions must be set to NO on the current Collection

View Controller

Tuesday, September 3, 13

Page 97: 3 whats-new-in-ios7-m3-uikit-slides

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 possibleo useLayoutToLayoutNavigationTransitions must be set to NO on the current Collection

View Controllero useLayoutToLayoutNavigationTransitions must be set to YES on the pushed Collection

View Controller

Tuesday, September 3, 13

Page 98: 3 whats-new-in-ios7-m3-uikit-slides

Motion

Tuesday, September 3, 13

Page 99: 3 whats-new-in-ios7-m3-uikit-slides

Motion

§ Part of the look of the new OS is related to depth and motion

Tuesday, September 3, 13

Page 100: 3 whats-new-in-ios7-m3-uikit-slides

Motion

§ Part of the look of the new OS is related to depth and motiono Springboard has a parallax effect behind it

Tuesday, September 3, 13

Page 101: 3 whats-new-in-ios7-m3-uikit-slides

Motion

§ Part of the look of the new OS is related to depth and motiono Springboard has a parallax effect behind it

§ Alerts move as your position moves

Tuesday, September 3, 13

Page 102: 3 whats-new-in-ios7-m3-uikit-slides

Motion

§ Part of the look of the new OS is related to depth and motiono Springboard has a parallax effect behind it

§ Alerts move as your position moveso Best seen in Safari multiple-page views

Tuesday, September 3, 13

Page 103: 3 whats-new-in-ios7-m3-uikit-slides

Motion

§ Part of the look of the new OS is related to depth and motiono Springboard has a parallax effect behind it

§ Alerts move as your position moveso Best seen in Safari multiple-page views

§ UIMotionBehavior is the main class in the new API

Tuesday, September 3, 13

Page 104: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

Tuesday, September 3, 13

Page 105: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super class

Tuesday, September 3, 13

Page 106: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effects

Tuesday, September 3, 13

Page 107: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the device

Tuesday, September 3, 13

Page 108: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

Tuesday, September 3, 13

Page 109: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffect

Tuesday, September 3, 13

Page 110: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffecto Give it a keypath and a min and max value

Tuesday, September 3, 13

Page 111: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffecto Give it a keypath and a min and max valueo Add it to any UIView – addMotionEffect

Tuesday, September 3, 13

Page 112: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffecto Give it a keypath and a min and max valueo Add it to any UIView – addMotionEffecto Use the new motionEffects property to "nd out what effects are applied to a view

Tuesday, September 3, 13

Page 113: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffecto Give it a keypath and a min and max valueo Add it to any UIView – addMotionEffecto Use the new motionEffects property to "nd out what effects are applied to a viewo removeMotionEffect to remove

Tuesday, September 3, 13

Page 114: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffecto Give it a keypath and a min and max valueo Add it to any UIView – addMotionEffecto Use the new motionEffects property to "nd out what effects are applied to a viewo removeMotionEffect to remove

§ UIMotionEffectGroup holds collection

Tuesday, September 3, 13

Page 115: 3 whats-new-in-ios7-m3-uikit-slides

Motion Effects

§ UIMotionEffect is the super classo You can subclass for your own effectso You are passed the UIOffset which tells you the vertical/horizontal offset motion of

the deviceo Return a dictionary of keypaths and relative values for that offset

§ Rather than subclassing, you can use UIInterpolatingMotionEffecto Give it a keypath and a min and max valueo Add it to any UIView – addMotionEffecto Use the new motionEffects property to "nd out what effects are applied to a viewo removeMotionEffect to remove

§ UIMotionEffectGroup holds collectiono Use UIMotionEffect subclass so you can add to [UIView addMotionEffect]

Tuesday, September 3, 13

Page 116: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

Tuesday, September 3, 13

Page 117: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screen

Tuesday, September 3, 13

Page 118: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screen

Tuesday, September 3, 13

Page 119: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

Tuesday, September 3, 13

Page 120: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

§ Messages scroll a bit behind your "nger

Tuesday, September 3, 13

Page 121: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

§ Messages scroll a bit behind your "nger§ Implemented by UIDynamics

Tuesday, September 3, 13

Page 122: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

§ Messages scroll a bit behind your "nger§ Implemented by UIDynamics

o A physics engine built into UIKit

Tuesday, September 3, 13

Page 123: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

§ Messages scroll a bit behind your "nger§ Implemented by UIDynamics

o A physics engine built into UIKit

§ Create a behavior

Tuesday, September 3, 13

Page 124: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

§ Messages scroll a bit behind your "nger§ Implemented by UIDynamics

o A physics engine built into UIKit

§ Create a behavioro Con"gure with items to animate

Tuesday, September 3, 13

Page 125: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics

§ Slide to get camera on lock screeno Bounces and hits bottom of screeno Simulated weight

§ Messages scroll a bit behind your "nger§ Implemented by UIDynamics

o A physics engine built into UIKit

§ Create a behavioro Con"gure with items to animateo Add it to the view

Tuesday, September 3, 13

Page 126: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

Tuesday, September 3, 13

Page 127: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavior

Tuesday, September 3, 13

Page 128: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

Tuesday, September 3, 13

Page 129: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavior

Tuesday, September 3, 13

Page 130: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

Tuesday, September 3, 13

Page 131: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavior

Tuesday, September 3, 13

Page 132: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravity

Tuesday, September 3, 13

Page 133: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

Tuesday, September 3, 13

Page 134: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

§ UIPushBehavior

Tuesday, September 3, 13

Page 135: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

§ UIPushBehavioro Apply forces to views

Tuesday, September 3, 13

Page 136: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

§ UIPushBehavioro Apply forces to views

§ UISnapBehavior

Tuesday, September 3, 13

Page 137: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

§ UIPushBehavioro Apply forces to views

§ UISnapBehavioro Snap to point

Tuesday, September 3, 13

Page 138: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

§ UIPushBehavioro Apply forces to views

§ UISnapBehavioro Snap to point

§ UIDynamicItemBehavior

Tuesday, September 3, 13

Page 139: 3 whats-new-in-ios7-m3-uikit-slides

Dynamics API Behaviors

§ UIAttachmentBehavioro Attaches two views together

§ UICollisionBehavioro Models collision with views or boundaries

§ UIGravityBehavioro Models gravityo 1000 points per second per second instead of Earth’s 9.8m per second per second

§ UIPushBehavioro Apply forces to views

§ UISnapBehavioro Snap to point

§ UIDynamicItemBehavioro Access to low-level properties of an item in Dynamics

Tuesday, September 3, 13

Page 140: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

Tuesday, September 3, 13

Page 141: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restoration

Tuesday, September 3, 13

Page 142: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

Tuesday, September 3, 13

Page 143: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

Tuesday, September 3, 13

Page 144: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handling

Tuesday, September 3, 13

Page 145: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launch

Tuesday, September 3, 13

Page 146: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launcho ignoreSnapshotOnNextApplicationLaunch

Tuesday, September 3, 13

Page 147: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launcho ignoreSnapshotOnNextApplicationLaunch

§ Other enhancements

Tuesday, September 3, 13

Page 148: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launcho ignoreSnapshotOnNextApplicationLaunch

§ Other enhancementso System Version/Timestamp keys

Tuesday, September 3, 13

Page 149: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launcho ignoreSnapshotOnNextApplicationLaunch

§ Other enhancementso System Version/Timestamp keyso Improved UITableView support

Tuesday, September 3, 13

Page 150: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launcho ignoreSnapshotOnNextApplicationLaunch

§ Other enhancementso System Version/Timestamp keyso Improved UITableView supporto UICollectionView support

Tuesday, September 3, 13

Page 151: 3 whats-new-in-ios7-m3-uikit-slides

State Restoration

§ You can now register arbitrary objects to be part of state restorationo [UIApplication registerObjectForStateRestoration:restorationIdenti"er:]

o Implement UIStateRestoration protocol

§ Snapshot handlingo iOS7 will use Snapshot on launcho ignoreSnapshotOnNextApplicationLaunch

§ Other enhancementso System Version/Timestamp keyso Improved UITableView supporto UICollectionView supporto Mail Activity Controller

Tuesday, September 3, 13

Page 152: 3 whats-new-in-ios7-m3-uikit-slides

Summary

Tuesday, September 3, 13

Page 153: 3 whats-new-in-ios7-m3-uikit-slides

Summary

§ To implement the UI changes in iOS7, Apple invested a considerable of amount of work in UIKit

Tuesday, September 3, 13

Page 154: 3 whats-new-in-ios7-m3-uikit-slides

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