iOS 8 Extension: how to use xib inside Cocoa Touch

2019-09-01 14:38发布

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条回答
做自己的国王
2楼-- · 2019-09-01 15:07

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

查看更多
登录 后发表回答