2

我试图将一个从 Apple 的 iOS 开发者库下载的 xib 项目变成一个纯代码项目以供进一步使用,但它没有用。

我不知道我在做这种转换时应该注意什么,我想它会帮助我提高我的iOS开发技能。

4

2 回答 2

1

有一些可用的工具。例如, http: //kosmaczewski.net/projects/nib2objc/

于 2013-09-05T13:32:46.110 回答
1

将 Xib 文件转换为纯代码部分并不是一项很大的任务,您只需要小心地将通过 Interface builder 创建的项目替换为您的代码部分。您可以在转换此类项目时遵循此顺序:-

1) Display the elements made via IB with your code.
2) Make sure the delegates and datasources to be connected via code if they were connected via     IB.
3) Check for the IBActions, if any to be replaced.
4) Lastly, if you are not using ARC or the Project that is being converted not using ARC then the dealloc part or viewDidUnload method, where we generally make the objects nil and release.

希望它可以帮助你:)

于 2013-12-31T06:41:52.443 回答