Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to AsyncDisplayKit / Texture

Introduction to AsyncDisplayKit / Texture

Presented at Swift Mumbai Meetup @ Here Technologies
https://www.meetup.com/SwiftMumbai/events/266462321/

How to get started with AsyncDisplayKit / Texture framework in Swift? Who? When? And Where to use this framework? And a few common mistakes I ran into while learning about this framework.

Speaker: Rushit Rakhasiya, iOS Developer at Plexitech Technologies
LinkedIn: https://www.linkedin.com/in/rushit-rakhasiya-757aa0167/
GitHub: https://github.com/avidrush94

Eeb061c8b2816b771920da1b3e7904a3?s=128

Swift India

January 25, 2020
Tweet

Transcript

  1. None
  2. None
  3. THEORY CODE* *discuss only conceptual details

  4. “Design is not just what it looks & feels like.

    Design is how it WORKS”
  5. Design vs Develop Aesthetics vs Performance UI vs UX Styling

    vs Coding Looks vs Tasks
  6. 1 Better Performance 2 Better User Interface

  7. 60 fps 50ms UI in Code Peace of Mind Smooth

    UI guarantee Responsive UI. Always. Cause storyboards… Reusability, Testing, etc…
  8. Concurrency Abstraction Intelligent Preloading

  9. Concurrency & Abstraction

  10. UIKit

  11. None
  12. None
  13. Intelligent Preloading Preload Display Visible Load the objects Adjust the

    layout Render the final View
  14. None
  15. Code

  16. Architecture 1 Nodes 2 Node Containers 3 Layout Specs

  17. 1 Nodes • Nodes are abstractions over UIView & CALayer

    • All nodes perform layout and display off of the main thread • You can access UIView & CALayer anytime with node.view & node.layer
  18. 2 Node Containers • A node container automatically manages the

    intelligent preloading of its nodes. • This means that all of the node’s layout measurement, data fetching, decoding and rendering will be done asynchronously.
  19. 3 Layout Specs • Layout specs act as containers for

    other layout elements by understanding how these children layout elements relate to each other • ASWrapperLayoutSpec • ASStackLayoutSpec • ASInsetLayoutSpec • ASOverlayLayoutSpec • ASBackgroundLayoutSpec • ASCenterLayoutSpec • ASRatioLayoutSpec • ASRelativeLayoutSpec • ASAbsoluteLayoutSpec • ASCornerLayoutSpec
  20. Points to Remember 1. Texture is written in Objective C++.

    2. It’s actively in development. 3. Properties maybe available with a different name in swift. 4. Require solid understanding of Concurrency and OOPs.
  21. Before you start! Ask yourself… 1. Is my UI really

    complex? 2. Does my UI have infinite scrolling? 3. Do I want to write that much of code? 4. Do I want to explain Texture to everyone?
  22. - Rushit Rakhasiya “Don’t use Texture, if UIKit is not

    killing your performance”
  23. Rushit Rakhasiya iOS Developer Github - @avidrush94 Email - avidrush94@gmail.com

    LinkedIn - Rushit Rakhasiya