iOS 8 Extension: how to use xib inside Cocoa Touch Framework in extensions?

廉价感情. 提交于 2020-01-06 18:53:56

问题


I'm creating an iOS 8 extension(Action extension in specific), I have some user interfaces that are both used in extension and my container app, so that I want to put those view controllers with their xibs inside my Cocoa Touch Library, so that I can share them between my app and extension.

But to my surprise, those xibs are neither in container app's bundle nor are they in my extension's bundle, so that neither of my app or extension can read those xibs.

What should I do to achieve this?


回答1:


You need to set the target to both your main app and the extension app. Click on the xib file and then on the right you will have the option which targets to include that xib in



来源:https://stackoverflow.com/questions/25397238/ios-8-extension-how-to-use-xib-inside-cocoa-touch-framework-in-extensions

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