简体   繁体   English

带xCode 3.2.4的iPhone开发

[英]iPhone Development w/ xCode 3.2.4

I just bought the book: Sams Teach Yourself iPhone Application Development in 24 Hours. 我刚买了这本书:Sams在24小时内自学iPhone应用程序开发。

In the book it uses xCode 3.2.4, so I went ahead and tried xCode 4.3 (the current version), but I didn't understand what to do... 在书中它使用xCode 3.2.4,所以我继续尝试xCode 4.3(当前版本),但我不知道该怎么做...

I then found this page... https://developer.apple.com/downloads/index.action 然后我找到了此页面... https://developer.apple.com/downloads/index.action

I downloaded the version of xCode used in the book (just so I could see the same thing the book shows). 我下载了本书中使用的xCode版本(只是为了看到本书所显示的相同内容)。

But, I'm getting two errors each having something to do with the Interface Builder... 但是,我遇到两个错误,每个错误都与Interface Builder有关...

"This version of Interface Builder does not support documents of type "Interface Builder Cocoa Touch Document (XIB 3.x)" targeting "iPhone/iPod touch"." “此版本的Interface Builder不支持以“ iPhone / iPod touch”为目标的“ Interface Builder可可触摸文档(XIB 3.x)”类型的文档。”

And it comes up twice for two different documents in my xCode project. 对于我的xCode项目中的两个不同文档,它出现了两次。

How can i get it to work? 我如何使它工作? In the book the code I put in works just fine. 在这本书中,我输入的代码效果很好。

Also my Mac Version is: 10.7.3 我的Mac版本也是:10.7.3

Do not waste time learning anything about Xcode 3.x. 不要浪费时间学习有关Xcode 3.x的任何知识。 That would be like learning how to build catapults and siege engines in preparation for a career in the military. 这就好比学习如何建造弹射器和攻城器,为军事生涯做准备。

Apple completely rewrote Xcode with version 4.0, and every single thing about the user interface is totally and completely different. 苹果完全用4.0版重写了Xcode,关于用户界面的每件事都完全不同。 If you invest time learning 3.x, you will be totally lost and confused when you move up to 4.x (version 4.3. was just released, and there is yet a new version on the horizon.) 如果您花时间学习3.x,那么当您升级到4.x时会完全迷失和困惑(版本4.3。刚刚发布,并且即将推出新版本。)

I was totally lost and confused for about 2 weeks when I made the move from Xcode 3.x to 4.x, and I do this for a living and have been using Xcode for over 6 years now. 当我从Xcode 3.x转到4.x时,我完全迷失了自己,困惑了大约2周,我这样做是为了维持生计,并且已经使用Xcode已有6年以上了。

Unfortunately, the iOS development books are behind the curve when it comes to versions of Xcode. 不幸的是,当涉及到Xcode版本时,iOS开发书就落后了。

Do yourself a favor and set the Xcode 3 book aside and find an Xcode 4 book (an ebook might be a better choice, since they can be updated.) 帮自己一个忙,把Xcode 3书籍放在一旁,找到一本Xcode 4书籍(电子书可能是更好的选择,因为它们可以更新。)

From what I just read, the xib files you have are not compatible with the newest version of Xcode. 从我刚刚阅读的内容来看,您拥有的xib文件与最新版本的Xcode不兼容。

You may learn loads by fixing this. 您可以通过解决此问题来学习负载。

Don't delete the two files yet... 暂时不要删除这两个文件...

Will the xib documents still display in IB? xib文档仍会显示在IB中吗?

Try this: 尝试这个:

Rename the two xib files to some other name. 将两个xib文件重命名为其他名称。

*) With the old file open in IB, click View, Utilities, Show File Inspector. *)在IB中打开旧文件后,单击“查看”,“实用程序”,“显示文件检查器”。

Click File's Owner, Rename 单击文件的所有者,重命名

1) In toolbar click File, New, File 1)在工具栏中单击文件,新建,文件

2) Choose User Interface, Empty, Next, Next 2)选择“用户界面”,“空”,“下一步”,“下一步”

3) Type the name of the corresponding .h file, be case sensitive. 3)键入相应的.h文件的名称,区分大小写。 Click Create. 单击创建。

4) Click File's Owner 4)单击文件的所有者

5) With the new file open in IB, click View, Utilities, Show Identity Inspector. 5)在IB中打开新文件后,单击“查看”,“实用程序”,“显示身份检查器”。

6) For the class name, Use the class name in which you are attempting to fix. 6)对于类名,请使用要尝试修复的类名。

7) Drag a New View object to to the canvas, right click the new view, and set a Reference to the file owner's view variable by dragging to File Owner. 7)将“新视图”对象拖到画布上,右键单击新视图,然后通过拖动到“文件所有者”来设置对文件所有者的视图变量的引用。

At this point, you could attempt to copy all the objects out of the old xib and paste to the new one. 此时,您可以尝试将所有对象从旧的xib中复制并粘贴到新的xib中。 Make sure you check all referencing outlets and target action stuff. 确保检查所有引用出口和目标操作内容。

8) Delete the old files in Xcode by right clicking and choose Delete, References Only. 8)右键单击并删除Xcode中的旧文件,然后选择“删除,仅引用”。

Let me know if this works or not. 让我知道这是否有效。

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

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