Skip to content

Latest commit

ย 

History

History
81 lines (42 loc) ยท 2.8 KB

Improving-Existing-Apps-with-Modern-Best-Practices.md

File metadata and controls

81 lines (42 loc) ยท 2.8 KB

Improving Existing Apps with Modern Best Practices

๐Ÿ“… 2019.11.27 (WED)

WWDC 2016 | Session :213 | Category : Xcode

๐Ÿ”— Improving Existing Apps with Modern Best Practices - WWDC 2016 - Videos - Apple Developer

Reduce Technical Debt

Cycle of Development

๐Ÿ†•Treat Warnings as Errors

Treat warning as errors forces you and your team to address the issue.

โ€œEach bug report is as unique as a snowflake.โ€

Asset Catalogs

For scaled images, we're asking you to provide 3 different renderings of the artwork from 1X devices, non-retina, 2X and 3X.

If we don't find, because you didn't include it, the 2X and 3X, we'll take the 1X image and scale it up so that it becomes as image that's used on the higher end devices or the higher density devices.

If you just provided 3X artwork, we'd scale it down at runtime.

Scale up 1X image, it's going to look jaggy. It's going to have a visual artifact called aliasing.

Scale down a 3X image, we have to open a 3X image and it's really big. And then we take an extraction of the pixels and create a scaled-down version for it

Your app is terminated because you didn't provide the artwork.

Vector Assets

โ†’ Scalable to any size

โ†’ Scale and rasterized at build time

For Vector Assets, Vector Assets are amazing because the file contains a set of instructions on how to draw the image as opposed to having it pre-rasterized.

๐Ÿ†•Image Compression

Dependency Injection

๐Ÿšซ

Each ViewController reaches back to some common object, maybe that you're storing in your app delegate.

โœ…

Using Dependency Injection, you take the model object that one ViewController has an you pass it forward to the next ViewController at the time that ViewController is presented.

Coming back from Dependency Injection

  • Crate and implement a Protocol
  • Pass a Closure to the Destination View Controller
  • Pass Model Objects by Reference
  • Unwind/Exist Segues, with prepareForSegue: