Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long did it take you to learn Objective-C probably? [closed]

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 X until Chapter 7.

In chapter 5 and 6, there is a challenge you should do, especially chapter 5 where he write:

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.

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?

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%. Please help me on this one!

Thank you in advance

like image 588
Filuren Avatar asked Dec 21 '22 21:12

Filuren


2 Answers

It sounds to me like all you need is a conceptual foundation.

Like you, I came from C, so I've been there.

Start here:

  • Object-Oriented Programming with Objective-C

Then, learn Objective-C (the actual language) and Cocoa or 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)

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%.

If you're trying to implement them on the iPhone, that may be the problem: The book is Cocoa Programming 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.

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.

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.

like image 146
Peter Hosey Avatar answered Mar 03 '23 19:03

Peter Hosey


Took me a few days... had to do a couple of iphone apps, and as such picked it up.

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.

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).

like image 32
Thomas Clayson Avatar answered Mar 03 '23 20:03

Thomas Clayson