简体   繁体   English

如果可以从“今天”小部件设置徽章编号

[英]If is possible to set badge number from “today” widget

If is possible to set badge number from "today" widget? 如果可以从“今天”小部件设置徽章编号?

I understand it is not possible to set directly in the widget, but is it possible to communicate with the app and set it there, without open the app to front? 我知道不可能直接在小部件中设置,但是可以与应用程序进行通信并将其设置在那里,而无需在前面打开应用程序吗? I have tried NSNotificationCenter postNotificationName, but I cannot get it to work across widget and app. 我已经尝试过NSNotificationCenter postNotificationName,但我无法让它在小部件和应用程序中工作。

I understand background fetch may work, but it is quite inefficient to have a routine background fetch just to the badge number on icon. 我理解后台提取可能会起作用,但是只对图标上的徽章编号进行例行后台提取是非常低效的。

Any good idea? 有什么好主意吗?

I have done some research and I don't think that this is currently possible (unfortunately). 我做了一些研究,我认为目前不可能(不幸的是)。 So I filed an enhancement request via https://bugreport.apple.com/ . 所以我通过https://bugreport.apple.com/提交了一份增强请求。 You may do the same. 你也可以这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM