简体   繁体   English

在Xcode 5中导出和使用自定义控件

[英]Exporting & Using custom control in xcode 5

I have built a custom control, following tutorials online (which are in abundance) and some of my own knowledge. 我已经建立了一个自定义控件,并遵循在线教程(内容丰富)和一些我自己的知识。 the tutorials, by the way, showed nothing about compiling and using the control in another project. 顺便说一下,这些教程并未显示有关在另一个项目中编译和使用控件的任何信息。

I am relatively new to iOS development, and would like to know how to export the custom control so it can be used in another app (like an sdk). 我是iOS开发的新手,我想知道如何导出自定义控件,以便可以在另一个应用程序(如sdk)中使用它。

can I do this without an Apple's ID, developer account, etc. ? 没有Apple的ID,开发者帐户等,该怎么办? since it's only a control (is it supposed to be an ipa)? 因为它只是一个控件(应该是一个IPA)? does it need a signature? 需要签名吗?

You can: 您可以:

1) simply drag the file(s) containing your custom control class(es) into another project 1)只需将包含自定义控件类的文件拖到另一个项目中

2) or you can create a framework . 2)或者您可以创建一个框架

In the first case it will be just some text files with code and in the second case these files will be compiled into a framework, which doesn't require a signature. 在第一种情况下,它将只是一些带有代码的文本文件,在第二种情况下,这些文件将被编译到一个框架中,该框架不需要签名。 When you add that framework to another project and build it, the binary is linked with the framework and everything is signed automatically, so you needn't worry about that. 当您将该框架添加到另一个项目并进行构建时,二进制文件将与该框架链接,并且所有内容都将自动签名,因此您不必担心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM