Refreshing Your App in iOS 7


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Refreshing Your App in iOS 7

  1. 1. Refreshing your app in iOS 7 Michael Vitrano @michaelvitrano
  2. 2. Going iOS 7+ ● Impressive adoption rate: ~60% in less than a week ● Older versions of apps are available on iTunes ● Users expect their apps to be native to the iOS 7 ecosystem ● Awesome new APIs
  3. 3. New APIs ● Text Kit ● UIKit Dynamics ● Multitasking ● Custom View Controller Transitions
  4. 4. Custom View Controller Transitions ● Pre iOS 7, you could have implemented this functionality yourself ● Required hacks, manually managing the process ● Using the new API, these types of transitions require much less code and effort
  5. 5. iOS 7 as an Engineering Refresh ● You’re going to be rethinking and revamping almost every part of your app’s experience ● Given this, an iOS 7 update is the perfect opportunity to rethink your app’s architecture and organization.
  6. 6. The Evolution of an App
  7. 7. A Modular Approach Editor App
  8. 8. A Modular Approach (cont.) Editor Photo Selection and Sharing Content Analytics
  9. 9. Thin View Controllers ● One of the biggest problems was bloated View Controllers ● Four Techniques: ○ Using modern APIs ○ Splitting View Controllers into categories ○ Composition over Subclassing ○ Data aware views
  10. 10. Modern APIs ● Previously, we were supporting iOS 5 ● UICollectionView ● AutoLayout
  11. 11. Categorizing View Controllers ● View controllers can have many different roles at once ● Group different aspects of the Controller’s functionality into categories ● Reduces the number of lines per file, improves organization and code clarity
  12. 12. AFPhotoSourceViewController PhotoSourcePhotoEditor StackTransitions CarouselView Base Class (View Initialization, Interface actions)
  13. 13. Composition over Subclassing ● Organize frequently used design patterns into template objects ● Allows for code reuse for slices of common functionality in objects that do not share an inheritance chain
  14. 14. Collection View Data Source ● AFCollectionViewDataSource ● Takes an array of data objects and UICollectionViewCell subclass implementing the AFCollectionViewDataSourceView protocol ● Multi-Section versions too!
  15. 15. Selection Controller ● Creates a Collection View, initializes the Layout and the Data Source ● Provides a common interface for View Controllers to receive selection events ● Everything is centered around data objects
  16. 16. Data Aware Views ● Certain views are designed solely to represent a piece of data, i.e. an Effect pack ● These views should be able to configure themselves to represent a particular data object ● Removes the configuration from the View Controller
  17. 17. Results ● Content View Controller Hierarchy ○ From 4 layers of subclasses to 2 ○ Reduced the amount of code by more than half ● Overall, reduced the code base by over 25% ● Improved compile times and developer productivity
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.