How to include classes of main application in to today widgets in iOS?

不羁的心 提交于 2019-12-24 14:11:53

问题


I have got Class1.h in the main Application. And I have to use Class1.h in the Today Widget in iOS. What is the method to share the classes among the main app and widget in iOS ?


回答1:


In Xcode, find Class1.m in the Project Navigator. Select it and, in the File Inspector, check the box next to your Today widget target under Target Membership.

Then you should be able to import Class1.h in your Today widget code.



来源:https://stackoverflow.com/questions/34157254/how-to-include-classes-of-main-application-in-to-today-widgets-in-ios

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