WidgetKit

135 阅读1分钟

Overview

WidgetKit gives users ready access to content in your app by putting widgets on the iOS Home Screen and Today View, the macOS Notification Center, and by putting accessory widgets on the Lock Screen on iPhone and as complications in watchOS. Your widgets stay up to date so users always have the latest information at a glance. When they need more details, your widget takes them directly to the appropriate place in your app.

With different sizes (small, medium, large, extra large) and accessory styles (circular, rectangular, flat, and corner in watchOS), widgets can display a wide range of information. Users can personalize widgets to see details specific to their needs, and arrange their widgets in whatever way works best for them. When users stack widgets on the Home Screen and enable Smart Rotate, WidgetKit automatically rotates the most relevant widget to the top, making sure users see the most important details at exactly the right time.

Starting with iOS 16 and watchOS 9, WidgetKit allows you to create accessory widgets that appear as complications in watchOS and as widgets on the Lock Screen on iPhone. Accessory widgets are a great opportunity to bring your iOS app content to Apple Watch and your watchOS app content to iPhone.

WidgetKit gives users ready access to content in your app by putting widgets on the iOS Home Screen and Today View, the macOS Notification Center, and by putting accessory widgets on the Lock Screen on iPhone and as complications in watchOS. Your widgets stay up to date so users always have the latest information at a glance. When they need more details, your widget takes them directly to the appropriate place in your app.

With different sizes (small, medium, large, extra large) and accessory styles (circular, rectangular, flat, and corner in watchOS), widgets can display a wide range of information. Users can personalize widgets to see details specific to their needs, and arrange their widgets in whatever way works best for them. When users stack widgets on the Home Screen and enable Smart Rotate, WidgetKit automatically rotates the most relevant widget to the top, making sure users see the most important details at exactly the right time.

Starting with iOS 16 and watchOS 9, WidgetKit allows you to create accessory widgets that appear as complications in watchOS and as widgets on the Lock Screen on iPhone. Accessory widgets are a great opportunity to bring your iOS app content to Apple Watch and your watchOS app content to iPhone.