简体   繁体   English

如何制作通知中心小部件(iOS 5)

[英]How to make Notification Center Widgets (iOS 5)

iOS 5 introduced Notification Center Widgets and I would like to experiment with those widgets and make custom ones (with a Jailbroken device). iOS 5引入了Notification Center Widgets,我想尝试使用这些小部件并制作自定义小部件(使用Jailbroken设备)。 I couldn't quite figure out how to make such a widget. 我无法弄清楚如何制作这样的小部件。 The Widgets (WeeApps) are bundles stored in /System/Library/WeeAppPlugins. Widgets(WeeApps)是存储在/ System / Library / WeeAppPlugins中的包。 It would be great if anyone has already writren a guide or could share how the principal class of a WeeApp has to look like. 如果有人已经编写指南或者可以分享WeeApp的主要类看起来如何,那将是很棒的。 Ideal would be to have a WeeApp NIC template for theos :) 理想的是为theos提供WeeApp网卡模板:)

Note: This question is regarding so called WeeApps, system plugins for Notification Center introduced in iOS 5. Not to be confused with Today View Extensions introduced in iOS 8. 注意:这个问题与iOS 5中引入的所谓WeeApps,Notification Center的系统插件有关。不要与iOS 8中引入的Today View Extensions混淆。

I don't want to shameless-plug in here, but I wrote a small tutorial to help you with this. 我不想无耻地插入这里,但我写了一个小教程来帮助你。

How to write Notification Center Widgets for iOS (iOS 6 and Below) 如何为iOS编写通知中心小部件(iOS 6及以下版本)

Hope it helps you! 希望它能帮到你!

UPDATE UPDATE

Please note this is for iOS widgets running iOS 6 and below - In other words, this is for old jailbreak development. 请注意,这适用于运行iOS 6及更低版本的iOS小部件 - 换句话说,这适用于旧的越狱开发。 I may write an iOS 8 tutorial eventually, but this one is not it. 我最终可能会编写一个iOS 8教程,但这不是它。

OK i think i have found a good way to understand it, a sample widget with full source code available on github: https://github.com/WillFour20/WeeAppTest But whats most helpful is this tutorial and the NIC template for theos mentioned in the tutorial, I already made several widgets using this method and my custom NIC templates. 好吧我想我已经找到了理解它的好方法,一个在github上提供完整源代码的示例小部件: https//github.com/WillFour20/WeeAppTest但是最有用的是本教程和提到的theos的NIC模板在本教程中,我已经使用此方法和自定义NIC模板制作了几个小部件。 http://weeplugins.com/blog/?p=1 http://weeplugins.com/blog/?p=1

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

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