如何在iOS 10中创建在主屏幕上显示的小部件 [英] How to create widgets showing on home screen in iOS 10
问题描述
我需要在iPhone的主屏幕上创建自定义小部件。我附上了样本图片。请告诉我哪个扩展名有助于创建此内容。
I need to create custom widgets on home screen in iPhone. I have attach the sample image. Please give me any idea which extension will be helpful in creating this.
推荐答案
Swift3& Xcode8
Swift3 & Xcode8
如果您需要为您的主应用程序创建扩展程序
For above you need to create an extension for your Main App
-
我需要创建哪个扩展程序才能实现上述目标?
Which extension I need to create to achieve above one?
Ans:今日扩展
Ans:Today Extension
如何创建扩展?
How to create Extension?
Xcode - >文件 - >新建 - >目标 - >今日延期
Xcode -> File -> New -> Target ->Today Extension
创建扩展后,如果你想将数据从主应用程序传递到扩展,然后您需要了解AppGroups
After Creating Extension, If you want to pass data from Main App to Extension then you need know about AppGroups
AppGroups只是在主应用程序与扩展程序之间共享数据
AppGroups is nothing but to share data between Main App to Extensions
如何实现?
这篇关于如何在iOS 10中创建在主屏幕上显示的小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!