简体   繁体   中英

Can we share App class in Today- Widget-Extension

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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