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.