ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作

ios 对应 iphone

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

After thirteen iterations of iOS, Apple is finally transforming the Home screen by adding widgets to iOS 14 and iPadOS 14. There’s a whole new framework that will let developers create new types of widgets. But there’s more to it than meets the eye.

在经过13次iOS迭代之后,Apple终于通过向iOS 14和iPadOS 14添加小部件来转变主屏幕。 有一个全新的框架,可让开发人员创建新型的窗口小部件。 但是,它所具有的不仅仅是眼神。

小部件回家 (Widgets Come Home)

Apple introduced widgets to the iPhone in iOS 10. They were relegated to the Today View screen, which is accessible by swiping right on the lock screen or the Home screen.

苹果在iOS 10中向iPhone引入了小部件 。 他们被降级到“今日视图”屏幕,可以通过在锁定屏幕或主屏幕上向右滑动来访问。

Still, widgets became powerful tools and were incredibly useful for iPhone and iPad users who decided to use them.

尽管如此,小部件仍然成为功能强大的工具,并且对于决定使用它们的iPhone和iPad用户而言非常有用。

But all of that changes in iOS 14. Widgets are coming home. This is the biggest change to the Home screen along with the new App Library. While the Today View section still remains and you can still keep widget there, the entire experience of adding widgets has changed.

但是,iOS 14中的所有这些更改都已实现。 这是对主屏幕以及新的应用程序库的最大更改。 尽管“今日视图”部分仍然保留,并且您仍可以在其中保留小部件,但是添加小部件的整个体验已经改变。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

Now, when you tap in any empty space on the Home screen to enter the Home screen editing view, you’ll find a “+” button in the top-right corner.

现在,当您点击主屏幕上的任何空白区域以进入主屏幕编辑视图时,您会在右上角找到一个“ +”按钮。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

Tapping it will bring up a widget picker, which shows a list of all available widgets on your phone—both from Apple’s included apps and third-party apps you’ve installed—along with previews of them.

轻触它会弹出一个小部件选择器,其中显示了手机上所有可用小部件的列表(包括Apple随附的应用程序和已安装的第三方应用程序)以及它们的预览。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

Choose a widget, a size, and just tap the “Add Widget” button to add a widget to whichever screen you’re on.

选择一个窗口小部件,选择一个大小,然后点击“添加窗口小部件”按钮即可将窗口小部件添加到您所在的任何屏幕上。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

You can then move the widget anywhere you want. Well, not exactly anywhere. Unlike Android, iOS still doesn’t let you put icons or widgets anywhere on the screen.

然后,您可以将小部件移至所需的任何位置。 好吧,不完全是任何地方。 与Android不同,iOS仍然不允许您在屏幕上的任何位置放置图标或小部件。

Icons and widgets still flow from the top left of the screen to the bottom right. And yes, widgets will automatically switch to dark mode.

图标和小部件仍然从屏幕的左上方流到右下方。 是的,小部件将自动切换到暗模式

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作

但是您不知道的小部件 (But Not The Widgets You’ve Known)

So, that’s the good news. Now about the bad. You see, while widgets are coming to the Home screen, they’re not the widgets you have used and loved over the past couple of years.

所以,这是个好消息。 现在说坏了。 您会看到,虽然小部件正在进入主屏幕,但它们并不是您在过去几年中使用和喜爱的小部件。

If a developer wants to create Home screen widgets for iOS 14, they have to use the new WidgetKit framework that’s built on Swift UI. And currently, it doesn’t support any form of interaction or live updates. This means that the new widgets are designed solely for glanceability—in other words, for quickly viewing information, just like complications in watchOS on the Apple Watch.

如果开发人员想要为iOS 14创建主屏幕小部件,则他们必须使用基于Swift UI构建的新WidgetKit框架。 当前,它不支持任何形式的交互或实时更新。 这意味着新的窗口小部件仅出于浏览目的而设计,也就是说,用于快速查看信息,就像Apple Watch上watchOS的复杂性一样。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Left: Pre-iOS 14 widgets. Right: iOS 14 widgets.
左:iOS 14之前的小部件。 右:iOS 14小部件。

This means that, if you’re used to calculator widgets or time-tracking widgets, you won’t find them on iOS 14. Widgets can have multiple tap targets that can be deep-linked to a part of the app, but that’s it. This is why the Music widget on iOS 14 doesn’t have any playback controls.

这意味着,如果您习惯于使用计算器小部件或时间跟踪小部件,则无法在iOS 14上找到它们。小部件可以具有多个可与应用程序的一部分深度链接的点击目标,仅此而已。 这就是为什么iOS 14上的“音乐”小部件没有任何播放控件的原因。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

The only exception we’ve found is the Shortcuts app—but, then again, Shortcuts automations are deeply integrated in the OS. The Shortcuts widget works independently. When you tap a shortcut, it just starts working, without opening the app. If there are any interactive elements in the shortcut, you’ll see them on the top of the screen in a floating window.

我们发现的唯一例外是“ 快捷方式”应用程序 -但是,快捷方式自动化又被深度集成在操作系统中。 快捷方式小部件独立工作。 当您点击快捷方式时,它就可以开始工作,而无需打开应用程序。 如果快捷方式中有任何交互式元素,您将在浮动窗口的屏幕顶部看到它们。

As of now, Apple has officially deprecated the older widgets. They’ll still continue to work and you can use them in the Today View screen, but you can’t add these widgets to the Home screen. We don’t when or if Apple will completely remove support for them.

截至目前,Apple已正式弃用较旧的小部件。 它们仍将继续工作,您可以在“今日视图”屏幕中使用它们,但不能将这些小部件添加到主屏幕。 我们不会在什么时候或是否Apple会完全取消对它们的支持。

未来是什么样子的 (What the Future Holds)

It’s clear that the nature of widgets is changing from iOS 14 and beyond. Apple’s reasoning for this change seems to be for glanceability and power management. Widgets should be designed so a user can quickly glance at it while they’re on the Home screen, and it shouldn’t drain the battery.

很明显,小部件的性质正在从iOS 14及更高版本中发生变化。 苹果之所以做出这一改变,似乎是出于扫视和电源管理的考虑。 窗口小部件的设计应使用户在主屏幕上时可以快速浏览一下,并且不应浪费电池。

Widgets can update based on a timeline that’s defined by the developer, but that’s it. We hope that by this time next year, Apple has figured out a way to add interaction to widgets without sacrificing battery life.

窗口小部件可以根据开发人员定义的时间轴进行更新,仅此而已。 我们希望,到明年这个时候,苹果公司已经找到了一种在不牺牲电池寿命的前提下向小部件添加交互功能的方法。

Because when it comes to the design and UI, the new widgets look amazing on the Home screen (far better than the old widgets, which had no cohesive design language).

因为当涉及到设计和UI时,新的小部件在主屏幕上看起来很漂亮(远比不具有统一设计语言的旧小部件更好)。

And in some ways, the new widgets are more flexible in iOS 14. You can have multiple versions of the same widget in the same or multiple sizes. You can stack multiple versions of the same widgets on top of each other and just flick between them.

并且在某些方面,新的小部件在iOS 14中更加灵活。您可以以相同或多种大小使用同一小部件​​的多个版本。 您可以将多个相同版本的窗口小部件相互堆叠,然后在它们之间滑动。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作

And, because Apple is using the Intents-based framework (from SiriKit and Shortcuts) in widgets, you can customize multiple versions of the widgets to show different kinds of data. For example, you can have three different Reminders widgets in a stack that shows your reminders from three different lists.

而且,由于Apple在小部件中使用基于Intents的框架(来自SiriKit和Shortcuts),因此您可以自定义小部件的多个版本以显示不同种类的数据。 例如,您可以在堆栈中具有三个不同的“提醒”小部件,这些小部件显示来自三个不同列表的提醒。

ios 对应 iphone_iPhone主屏幕小部件在iOS 14中如何工作
Khamosh Pathak
Khamosh Pathak

That’s just what Apple has done so far. We’ve yet to see what developers will be able to do using the WidgetKit framework. While we’re losing the interactivity, we’re gaining new types of widgets and a cohesive design framework.

到目前为止,这就是苹果所做的。 我们还没有看到开发人员将能够使用WidgetKit框架做什么。 在失去交互性的同时,我们获得了新类型的小部件和具有凝聚力的设计框架。

But this is one of those wait-and-watch scenarios. We’ll know the true impact of the change once developers release their own widgets in Fall 2020—and when we see what improvements (if any) Apple makes to the WidgetKit framework in iOS 15.

但这是那些观望的情况之一。 一旦开发人员在2020年秋季发布了自己的小部件,以及我们看到Apple对iOS 15中的WidgetKit框架进行了哪些改进(如果有的话),我们就会知道更改的真正影响。



There’s a lot more to the specifics of how widgets work in iOS 14. For example, Smart Stacks will let you combine multiple widgets into a single stack of widgets you can swipe between on your iPhone. That’s one way iOS 14 will transform your iPhone (and iPad) Home screen.

关于iOS 14中小部件的工作方式的更多细节,例如,智能堆栈可让您将多个小部件组合成一个小部件堆栈,您可以在iPhone上进行滑动。 这是iOS 14转变iPhone(和iPad)主屏幕的一种方式。

翻译自: https://www.howtogeek.com/679991/how-iphone-home-screen-widgets-work-in-ios-14/

ios 对应 iphone