How to make Notification Center Widgets (iOS 5)

狂风中的少年 提交于 2019-12-20 10:55:32

问题


iOS 5 introduced Notification Center Widgets and I would like to experiment with those widgets and make custom ones (with a Jailbroken device). I couldn't quite figure out how to make such a widget. The Widgets (WeeApps) are bundles stored in /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. Ideal would be to have a WeeApp NIC template for theos :)

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.


回答1:


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)

Hope it helps you!

UPDATE

Please note this is for iOS widgets running iOS 6 and below - In other words, this is for old jailbreak development. I may write an iOS 8 tutorial eventually, but this one is not it.




回答2:


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. http://weeplugins.com/blog/?p=1



来源:https://stackoverflow.com/questions/7224895/how-to-make-notification-center-widgets-ios-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!