macos 你大概花了多长时间学习Objective-C?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4118656/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How long did it take you to learn Objective-C probably?
提问by Filuren
I have a question I really want answered. I have been playing around with some Objective-C for a few weeks, and I have been reading in the book Cocoa Programming for Mac OS Xuntil Chapter 7.
我有一个很想回答的问题。几个星期以来,我一直在玩一些 Objective-C,我一直在阅读Cocoa Programming for Mac OS X一书,直到第 7 章。
In chapter 5 and 6, there is a challenge you should do, especially chapter 5 where he write:
在第 5 章和第 6 章中,有一个你应该做的挑战,尤其是第 5 章他写道:
This exercise is an important challenge that you should do before moving on. Although it is easy to follow my instructions, you will eventually want to create your own applications. Here is where you can start to develop some independence.
这个练习是一个重要的挑战,你应该在继续之前做。尽管按照我的说明很容易,但您最终还是希望创建自己的应用程序。在这里,您可以开始培养一些独立性。
But I have not been successful on those challenges: tbh, I have no idea how to do them... It does not even help to look back the previous chapters and steal the code, I have no idea how to make it work and what I should be typing.
但是我在这些挑战中并没有成功:tbh,我不知道该怎么做......甚至回顾前几章并窃取代码也无济于事,我不知道如何使其工作以及什么我应该打字。
So my question is: how long did it take you to probably know Objective-C? For those who have read the book: where you able to do the challenges?
所以我的问题是:你大概花了多长时间了解 Objective-C?对于那些读过这本书的人:你能在哪里做挑战?
I really want to learn Objective-C program for the iPhone, but now that I don't even know how to do the challenges, I doubt it's possible for me to learn it... Is there still hope?
我真的很想学iPhone的Objective-C程序,但是现在我连挑战怎么做都不知道,我怀疑我能不能学……还有希望吗?
It should also be said that besides the challenges, much of the code he writes makes no sense to me. I am not sure why he writes it and what it does 100%. Please help me on this one!
还应该说,除了挑战之外,他写的很多代码对我来说都没有意义。我不确定他为什么写它以及它 100% 做什么。请帮我解决这个问题!
Thank you in advance
先感谢您
回答by Peter Hosey
It sounds to me like all you need is a conceptual foundation.
在我看来,您所需要的只是一个概念基础。
Like you, I came from C, so I've been there.
和你一样,我来自 C,所以我一直在那里。
Start here:
从这里开始:
Then, learn Objective-C (the actual language) and Cocoa or Cocoa Touch:
然后,学习 Objective-C(实际语言)和 Cocoa 或 Cocoa Touch:
- The Objective-C Programming Language
- Cocoa Fundamentals Guide(covers both Cocoa and Cocoa Touch, as the concepts are largely the same)
- Memory Management Programming Guide for Cocoa(and Cocoa Touch)
- Model Object Implementation Guide
- iOS Application Programming Guide(Cocoa Touch specific)
- Objective-C 编程语言
- Cocoa Fundamentals Guide(涵盖 Cocoa 和 Cocoa Touch,因为概念基本相同)
- Cocoa(和 Cocoa Touch)的内存管理编程指南
- 模型对象实现指南
- iOS 应用程序编程指南(Cocoa Touch 专用)
Don't worry about how long it'll take. Take your time. Work as fast or as slowly as you want.
不要担心需要多长时间。慢慢来。随心所欲地快速或缓慢地工作。
I really want to learn Objective-C program for the iPhone, but now that I don't even know how to do the challenges, I doubt it's possible for me to learn it... Is there still hope?
It should also be said that besides the challenges, much of the code he writes makes no sense to me. I am not sure why he writes it and what it does 100%.
我真的很想学iPhone的Objective-C程序,但是现在我连挑战怎么做都不知道,我怀疑我能不能学……还有希望吗?
还应该说,除了挑战之外,他写的很多代码对我来说都没有意义。我不确定他为什么写它以及它 100% 做什么。
If you're trying to implement them on the iPhone, that may be the problem: The book is CocoaProgramming for Mac OS X, and Cocoa and Cocoa Touch have some big differences between their application frameworks (AppKit in Cocoa, UIKit in Cocoa Touch). I would say either learn Cocoa (and implement the examples as Mac apps) first, since that's the book you have, or abandon that book and switch to one more iPhone-appropriate.
如果你试图在 iPhone 上实现它们,那可能是问题所在:这本书是CocoaProgramming for Mac OS X,Cocoa 和 Cocoa Touch 在它们的应用程序框架之间有一些很大的区别(Cocoa 中的 AppKit,Cocoa Touch 中的 UIKit )。我会说要么先学习 Cocoa(并将示例实现为 Mac 应用程序),因为那是您拥有的书,要么放弃那本书并改用另一本适合 iPhone 的书。
The Hillegass book gets a lot of recommendations, so if you find a different one that's better for iOS programmers who want to skip the Mac, don't be afraid to recommend it.
Hillegass 的书获得了很多推荐,因此如果您发现另一本更适合想要跳过 Mac 的 iOS 程序员,请不要害怕推荐它。
ETA: Also, if you don't want to program the Mac at all, your local library would probably love a current copy of the Hillegass book.
ETA:此外,如果您根本不想为 Mac 编程,您当地的图书馆可能会喜欢 Hillegass 书籍的当前副本。
回答by Thomas Clayson
Took me a few days... had to do a couple of iphone apps, and as such picked it up.
花了我几天时间...不得不做几个 iphone 应用程序,并因此选择了它。
My advice (although I'm liable to get shouted at) is to forget the examples in the books. Just apply yourself. Set yourself a challenge, and find out what you need to achieve it. You will learn by doing. :p Even though books may help, its essentially doing it that gets you the experience.
我的建议(尽管我很容易被骂)是忘记书中的例子。自己申请就行。给自己设定一个挑战,并找出实现它所需的条件。你会边做边学。:p 尽管书籍可能会有所帮助,但它本质上是这样做的,可以让您获得经验。
Once you know what an "object" is and how it works in objective c then you are pretty much set. All you need to find out is what objects to use. Everything else is pretty straightforward after that (trying not to say "easy" lol, but its straightforward).
一旦您知道“对象”是什么以及它在目标 c 中是如何工作的,那么您就大功告成了。您只需要找出要使用的对象即可。之后的一切都非常简单(尽量不要说“简单”,哈哈,但很简单)。
回答by Intentss
Go to iTunes and search for CS193P, you will find the video and slides from the CS193P class at stanford. Did I mention they are free?!
转到 iTunes 并搜索 CS193P,您将在 stanford找到CS193P 课程的视频和幻灯片。我有没有提到他们是免费的?!
回答by lakesh
I learnt the basics of objective c from newboston.com . He is a good tutor.. here is the link for it... http://www.youtube.com/watch?v=1Xqn5IHbusA
我从 newboston.com 学到了 Objective c 的基础知识。他是一个很好的导师……这是它的链接…… http://www.youtube.com/watch?v=1Xqn5IHbusA
回答by john
I literally justgot started and I found an awesome tutorial onlinethat has taught me some basics. I'm about 30% through it. Only been two days so far and learned a lot. It's fairly short, but descriptive (not as tedious as other tutorials)
我刚刚开始,我在网上找到了一个很棒的教程,它教会了我一些基础知识。我已经完成了大约 30%。只用了两天时间,学到了很多东西。它相当短,但具有描述性(不像其他教程那样乏味)
Today, I bought another book that seems good for simple iPhone apps. It's called iOS SDK Programming: A Beginner's Guide. Looks good because it shows a good connection between the Objective-C language and Xcode's Interface Builder (the really appealing visual stuff :] )
今天,我买了另一本书,它似乎适合简单的 iPhone 应用程序。它被称为 iOS SDK 编程:初学者指南。看起来不错,因为它显示了 Objective-C 语言和 Xcode 的 Interface Builder 之间的良好联系(真正吸引人的视觉内容:])
回答by Fahad Sadah
Can you already program?
I'd always suggest starting with a scripting language (Ruby and Python are very easy to learn) and not moving onto a harder language, like Objective-C, until you are 100% comfortable with the basics.
你已经可以编程了吗?
我总是建议从脚本语言开始(Ruby 和 Python 很容易学习),不要转向更难的语言,比如 Objective-C,直到你 100% 熟悉基础知识。
回答by alfyboza
I say don't lose hope!
我说不要失去希望!
I highlysuggest having a foundation in OOPbefore diving into Objective-C as Cocoa Touch (the foundation of iOS) is very dependent on that programming paradigm.
我强烈建议在深入研究 Objective-C 之前先打好OOP基础,因为 Cocoa Touch(iOS 的基础)非常依赖于该编程范式。
I used iPhone Programming: The Big Nerd Ranch Guideto learn Objective-C from an iOS-specific perspective. It took me about 2-3 weeks between work and school to complete the book and ready to tackle my own projects. Like the book you described, the Big Nerd Ranch Guide has some additional challenges that you can do to test your knowledge and ability to reference Apple's documentation.
我使用iPhone 编程:大书呆子牧场指南从特定于 iOS 的角度学习 Objective-C。我在工作和学校之间花了大约 2-3 周的时间来完成这本书并准备好处理我自己的项目。就像您描述的那本书一样,Big Nerd Ranch Guide 也有一些额外的挑战,您可以通过这些挑战来测试您参考 Apple 文档的知识和能力。
If you haven't already done so, bookmark Apple's own documentationas it's the best reference material you will find.
如果您还没有这样做,请将Apple 自己的文档加入书签,因为它是您会找到的最佳参考资料。