Frameworks are a powerful tool for sharing code between applications and extensions. Playgrounds are an awesome tool for quickly trying out code in Swift. Keeping a tight feedback loop with designers can be difficult. So, how can you combine the powerful and the awesome to help keep your feedback loop with design as tight as possible? Use UI Frameworks in Playgrounds! Learn how to build a UI-only framework, and then use it in a Playground. See how you can tempt your designers to the dark side of installing Xcode and tweaking values themselves. Ellen Shapiro discusses how she used this technique at SpotHero to speed up their 2017 redesign. Leave with tools to build a powerful framework, knowledge of how to make Playgrounds play nice with frameworks, and ideas for how your development and design teams can use these tools and techniques to power up your iOS app's UI.
14. Allow Designers To Express Their Intent
In A Way Which Shows Up In Code
Naming Things Consistently
15. Thing iOS Thing Android Thing
Color UIColor R.color
Non-editable Text UILabel TextView
Short Text Input UITextField EditText
Long Text Input UITextView EditText
Button UIButton Button
Top Navigation UINavigationBar Toolbar
Thing iOS Thing Android Thing
Color UIColor R.color
Non-editable Text UILabel TextView
Short Text Input UITextField EditText
Long Text Input UITextView EditText
Button UIButton Button
Top Navigation UINavigationBar Toolbar
16. Thing iOS Thing Android Thing
Color UIColor R.color
Non-editable Text UILabel TextView
Short Text Input UITextField EditText
Long Text Input UITextView EditText
Button UIButton Button
Top Navigation UINavigationBar Toolbar
Name From Designer
Corvette
Tangerine
Canary
Palm Tree
Ocean
Violet
17. Name From Designer iOS Var Name Android Name
Corvette exm_darkRed R.color.red
Tangerine exm_orange R.color.orange
Canary exm_mutedYellow R.color.pee
Palm Tree exm_green R.color.lt_green
Ocean exm_navyBlue R.color.ocean
Violet exm_purpleDrank R.color.go_u_nu
Name From Designer iOS Var Name Android Name
Corvette exm_corvette R.color.corvette
Tangerine exm_tangerine R.color.tangerine
Canary exm_canary R.color.canary
Palm Tree exm_palmTree R.color.palm_tree
Ocean exm_ocean R.color.ocean
Violet exm_violet R.color.violet
18. Name From Designer iOS Class Name Android Style Name
Headline Text EXMHeadlineLabel HeadlineTextStyle
Sub-Head Text EXMSubHeadLabel SubHeadTextStyle
Body Text EXMBodyLabel BodyTextStyle
Caption Text EXMCaptionLabel CaptionTextStyle
Warning Text EXMWarningText WarningTextStyle
Fine Print Text EXMFinePrintText FinePrintTextStyle
Name From Designer iOS Class Name Android Style Name
Primary Call To Action Button EXMPrimaryCTAButton PrimaryCTAButtonStyle
Secondary Call To Action Button EXMSecondaryCTAButton SecondaryCTAButtonStyle
Transactional Button EXMTransactionalButton TransactionalButtonStyle
DestructiveButton EXMDestructiveButton DestructiveButtonStyle
Edit Button EXMEditButton EditButtonStyle
Checkbox Button EXMCheckboxButton CheckboxButtonStyle
Radio Button EXMRadioButton RadioButtonStyle
Giant Button EXMGiantButton GiantButtonStyle
Super-Giant Button EXMSuperGiantButton SuperGiantButtonStyle
46. Playgrounds With Designers: Easy Mode
• Hand off via email, AirDrop, or synced folder
• Use a single, ginormous playground file**
• Create basic elements but don't include anything complicated
• Copy and paste files into the sources folder
**
May be REAL slow
Playgrounds With Designers: Advanced Mode
• Automatically generate every time there's a build of the
application
• Copy source files of framework into Sources folder in playground
using a script
• Use a multi-page playground to separate things
• Let designers download from a consistent place
47. Playgrounds With Designers: Expert Mode
• #SquadGoals
• Automatically generate only when changes have taken place in
the UI framework
• Create a Playground Book that allows designers to muck about
with stuff on their iPad
• Automatically upload so the designers can get it on their iPad
(iCloud? Dropbox?)
A Few Parting Recommendations
• Start small.
48. A Few Parting Recommendations
• Start small.
• Colors, fonts, UILabel subclasses
A Few Parting Recommendations
• Start small.
• Colors, fonts, UILabel subclasses
• Margins, font sizes, padding
49. A Few Parting Recommendations
• Start small.
• Colors, fonts, UILabel subclasses
• Margins, font sizes, padding,
• UIButtons, UITextFields, and other state-driven UI
A Few Parting Recommendations
• Start small.
• Colors, fonts, UILabel subclasses
• Margins, font sizes, padding,
• UIButtons, UITextFields, and other state-driven UI
• Custom Views And Animations
50. Build the
Building Blocks
via https://www.flickr.com/photos/designmilk/8552219138
Links!
• TrueColors app and the CyndiLauper parser: https://
github.com/vokal/TrueColors-macOS
• Sourcery: https://github.com/krzysztofzablocki/Sourcery
• Embedding frameworks in an .xcworkspace: https://
useyourloaf.com/blog/adding-playgrounds-to-xcode-projects/