如何在iOS的静态库中添加xib文件 [英] how to add xib file in static library in iOS

查看:45
本文介绍了如何在iOS的静态库中添加xib文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在静态库中添加 xib 文件或任何其他视图控制器文件,但我无法这样做.你能帮我吗?

I am trying to add xib file or any other view controller file within static library but I can't do so. Can you please help me?

如果可能,请添加完整的源代码

If possible please add the whole source code

他们是第一个视图的按钮.当点击那个按钮时,新的视图控制器会出现一些东西(比如背景颜色的变化).如何为此创建静态库?以便我可以在另一个项目中使用它?

their is button on first view. And when clicking on that button, new view controllers comes up with something (lets say changes in background color). How to create static library for this? so that I may use it in another project?

提前致谢

推荐答案

严格来说,不能向静态库添加 Xib 是正确的.但是,有一些解决方法.Matt Galloway 的带有资源的 iOS 库教程将向您展示如何做到这一点.

Strictly speaking, it's correct that you cannot add a Xib to a static library. However, there are workarounds. Matt Galloway's iOS Library With Resources tutorial will show you how to do just that.

请参阅 iOS 资源库.

这篇关于如何在iOS的静态库中添加xib文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆