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

Styling iOS apps Swiftly (NSSpain '16)

Styling iOS apps Swiftly (NSSpain '16)

Styling apps with stylesheets is fast, it enforces focus on reusability, and it's literally a common language with designers. Although there are several interesting ways to consider, let's see if Swift can revolutionize this approach! 🐥

When working on different apps of the same brand, there are a lot of logic we build to be shared. It's also quite usual that apps wear similar design, that's when reusing style becomes pretty important. We came across several solutions when working with Objective-C, like Classy and NUI, and love both. I'd like to share the experience we gathered through building apps with them, the good parts and the tradeoffs, and how does it look like if we forget these and try to solve the problem with Swift and its awesomeness.

6190e163993110536deb0767f9f63fdb?s=128

Agnes Vasarhelyi

September 15, 2016
Tweet

Transcript

  1. iOS apps SWIFTLY Agnes Vasarhelyi STYLING

  2. None
  3. data business UI 㿃

  4. None
  5. data UI Business 㿃

  6. STORYBOARDS http://objectivetoast.com/2014/07/10/solving-the-massive-storyboard-problem/

  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. UI code Great with defining reuse layout team live Easy

    to Common language within the Can reload
  15. None
  16. Content Presentation 㿃

  17. http://classykit.github.io/Classy/

  18. None
  19. None
  20. https://github.com/tombenner/nui

  21. None
  22. None
  23. None
  24. DEFINE A LANGUAGE

  25. None
  26. PARSE IT

  27. None
  28. UIAppearance

  29. None
  30. None
  31. UITraitCollection

  32. horizontal and vertical size class, display scale, user interface idiom

    _UITraitNameUserInterfaceIdiom = Phone, _UITraitNameDisplayScale = 2.000000, _UITraitNameHorizontalSizeClass = Compact, _UITraitNameVerticalSizeClass = Regular,
  33. None
  34. EXTEND

  35. None
  36. CONS app size - parsing time UIAppearance -> KVO code

    review
  37. PROS teamwork live reload use the same style in more

    apps parsing errors in compile time
  38. https://github.com/vasarhelyia/SwiftySheetsDemo

  39. SPECIAL Photos from unsplash.com Agnes Vasarhelyi | @vasarhelyia