如何从现有的 iPhone 项目中制作可重用的组件/类?
我正处于新的学习曲线的门口。
我想从我已完成的 iphone 项目中制作可重用的组件/类,并提到以下问题,如果有人想将我重定向到一些有用的可重用组件或类,这对我很有用。
并且还告诉我哪种是制作可重用类或组件的最佳方法?
https://stackoverflow.com/questions/200850/are-there-any-open-source-iphone-applications-around
谢谢。
I on the doorstep of a new learning curve .
I want to make reusable components / classes from my completed iphone project and with the mention of the following questions , If anyone want to redirect me to some useful reusable components or classes it will be useful to me .
And Also tell me which is the best way to make reusable classes or components ?
Is there a gallery of reusable iPhone components on the web?
https://stackoverflow.com/questions/200850/are-there-any-open-source-iphone-applications-around
Thanks .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要在 iPhone 上创建可重用的库,您应该创建一个“Cocoa Touch Static Library”类型的新目标。将构成库的源文件添加到这个新目标,并将它们从应用程序的目标中删除。现在将新目标添加为每个应用程序目标的依赖项(按住 Ctrl 键单击应用程序目标,获取信息,添加直接依赖项),并将库产品(称为
yourtargetname.a
)添加到“链接”应用程序的“库和框架”阶段。To make a reusable library on the iPhone, you should create a new target of type "Cocoa Touch Static Library". Add the source files that will go to make up the library to this new target, and remove them from your application(s)'s target(s). Now add the new target as a dependency of each application target (Ctrl-click the app target, get info, add direct dependency) and also add the library product (called
yourtargetname.a
) to the "link libraries and frameworks" phase of the app.