Skip to content

Instantly share code, notes, and snippets.

@zealoushacker
Last active January 1, 2016 08:39
Show Gist options
  • Select an option

  • Save zealoushacker/8119342 to your computer and use it in GitHub Desktop.

Select an option

Save zealoushacker/8119342 to your computer and use it in GitHub Desktop.
Crucial iOS7 changes

#Key Notes from iOS7 Tech Talks Videos - Architecting Modern Apps, Part 1

A few additional more detailed talks are available at WWDC Videos

##iBeacon

##Text kit for text management and layout

  • UIKit Dynamics for more responsive UI
  • Beautiful native animations that behave based on a physics engine
  • Interactive vs animated transitioning

##UIViewController changes ###Extended layout

  • Content underlaps navigation bars (iOS7) vs positioned below (iOS6)
  • Controlled by self.edgesForExtendedLayout = UIRectEdgeAll; property
    • Setting it to UIRectEdgeNone will revert to iOS6 behavior
  • Scroll views have self.automaticallyAdjustScrollViewInsets = YES; to inset content automatically to account for navigation and tab bars
  • Status bars have no background (it's transparent)
    • UIStatusBarStyleDefault - black status bar on light content
    • UIStatusBarStyleLightContent - white status bar on dark content
    • Use - (UIStatusBarStyle) preferredStatusBarStyle { ... } method on a concrete per-controller basis.
  • Hiding the status bar is done via - (BOOL)prefersStatusBarHidden { return YES; } method on a concrete per-controller basis.
  • It's possible to animate status bars out and in via a slew of methods for cleaner transitions, if necessary

##Text Kit No UITextKit.h anywhere, part of UIKit

###Text Styles

  • Referring to a font by its purpose: i.e. headline, subheadline, body, footnote, caption 1, caption 2, etc.
  • Use + (UIFont *)preferredFontForTextStyle:(NSString *)style

###Dynamic Type

  • Small font size, medium font size, large font size.
  • Affects rendering
  • Can change while the app is running!
  • Listen for UIContentSizeCategoryDidChangeNotification UIContentSizeCategorySmall, UIContentSizeCategoryMedium, UIContentSizeCategoryLarge, etc.
  • Does NOT affect things like navigation bar fonts
  • Only affects content

###Font Descriptors

  • This is crucial and absolutely key
  • Should be the primary way to implement fonts in app
  • Emulate dynamic type, when using custom fonts!
  • The model that describes the font
  • Used to describe font attributes
  • Cheap to create these objects - like Font VOs :)
  • Makes it easy to compose fonts
  • Build compositions of fonts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment