问题
I am developing an application where I have to use my some class in Today- Widget-Extension. But I am not getting any way to access those class. Is it possible to access application class in Today- Widget-Extension.
回答1:
It is possible. First you need to set targets of your class to both aplication and extension. Second you need to put public
keyword to your class. You can read more on that here.
来源:https://stackoverflow.com/questions/31158925/can-we-share-app-class-in-today-widget-extension