WidgetKit is a new Swift framework introduced in WWDC20 that allows you to bring out the most important data from your app on your home screen!


Design

Widgets in iOS need to be designed keeping three things in mind: glanceability, relevance, and personalisation.

Image for post

Photo from Apple Developer.

  • Glanceability — Data should be presented in a meaningful way.
  • Relevance — Based on usage patterns, iOS14 automatically shows relevant widgets. You do have some level of control in helping iOS understand how frequently users would want to see your widget, especially when multiple widgets are in the same smart stack.
  • Personalisation — Shown data can be resized and personalised based on the user’s preferences (e.g. a weather widget could show the weather for the user’s geographical location or a calendar widget could show events based on the current date and time).

Image for post

#ios #mobile #swift #programming

Widgets in iOS 14 With WidgetKit
34.65 GEEK