Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Simmons

macrumors newbie
Original poster
Dec 28, 2009
20
0
I have read Beginning iPhone 3 Development (by Dave Mark and Jeff LaMarche) and I can't really make an app on my own. If I see the syntax I understand what I am reading, but I can't think of it when I am doing my own programming. Should you memorize what to put where or do you just know what is what and where to put it. I also what to know, is it normal not to be able to do it at this stage of learning? Is it like guitar where you can play tabs all day long but after a while you will get your own style and can just jam?'

Thanks,
Simmons
 

North Bronson

macrumors 6502
Oct 31, 2007
395
1
San José
If you're talking about learning the Cocoa frameworks, it's going to be a lot of memorization (method calls and class names). You can get a "feel" for different design patterns (like delegation) that will help you to "play by ear", but you will always be referencing the documentation to look up methods that you just can't quite remember.

The actual Objective-C (and straight C) syntax comes to you with practice.

I'm not sure that "memorizing" the Cocoa frameworks is really a great way to approach learning Cocoa programming. I would focus on getting a feel for design patterns and the Objective-C syntax.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
I have read Beginning iPhone 3 Development (by Dave Mark and Jeff LaMarche) and I can't really make an app on my own. If I see the syntax I understand what I am reading, but I can't think of it when I am doing my own programming. Should you memorize what to put where or do you just know what is what and where to put it. I also what to know, is it normal not to be able to do it at this stage of learning? Is it like guitar where you can play tabs all day long but after a while you will get your own style and can just jam?
This seems a little troubling. Is it the specific syntax (method names, properties) for what you are trying to achieve that confuses you? If so, Code Sense can be a big help in this area. As can being able to access the Developer Documentation directly from with the code (Option + double-clicking a symbol, if you've never tried it). If it's just a general discomfort with syntax, I fear there are deeper issues at work here. After having read that whole book you should at least be able to be creative enough to have ideas of things you want to try that are not specifically covered in the book. Perhaps you might want to pick up a copy of Stephen Kochan's "Programming in Objective-C 2.0", which has exercises at the end of every chapter. These give you direction in other things you may want to try without giving you the answers. It covers only Obj-C mostly but should help you to become more comfortable with thinking beyond code given to you. Hope that helps.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
You shouldn't just READ the book you have to do the exercises also. The next step is to write an app yourself. Pick a simple app idea and do the whole thing.

Memorizing UIKit isn't how it's done. You need to understand the underlying principles. Copying code from something you wrote before or from Apple's sample code or from the web somewhere is something you'll do a lot of. But you need to fit it into your current app design and make it work.

Different musical styles demand more or less improvisational skills. All demand technical skills. If you want to learn Jazz guitar or Rock lead guitar you need to learn improvisational skills. If you want to play rhythm guitar it's mainly just technical skills. To write iPhone apps you need both technical skills and improvisational skills. More like Jazz or lead guitar. Obviously you need the ability to write music not just play it.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
OK.

My main point though is that if you've read the docs then it's time to start in on a simple app. Expect to go back to the docs and the books you've read for clarification. That's normal.
 

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
everyone's learning curve is different, but you will learn if you continue. read as many books as you can. besides Programming in Objective-C 2.0, which was suggested, there are a few other iPhone SDK books being released very very soon such as the sequel to the book you already have, "More iPhone 3 Development: Tackling iPhone SDK 3", as well as "Beginning iPhone Games Development" just to name a few.

after studying programming part-time for the past 2 years, i recently has a sudden realization concerning one aspect of object oriented development that seriously changed everything for me. quite literally overnight it all became so much more clear. i'm not going to say what it was because it's embarrassing :eek:, and i probably should have realized it much sooner, but that's the way it happened to work out for me.

also, i remember feeling overwhelmed by apple's documentation when i first started trying to read/use it, but now i'm trigger-happy with Option+double-click. the docs are invaluable.
 

Simmons

macrumors newbie
Original poster
Dec 28, 2009
20
0
Well, I understand the syntax fully, but if I were to try to sit down and write an app with no help than I don't think I could do it.

Although, while I'm here I do have one question about something that wasn't explained fully in my book, which is the asterisk (*). What does it mean? For example:
(NSFetchedResultsController *)
NSString *sectionKeyPath
 

North Bronson

macrumors 6502
Oct 31, 2007
395
1
San José
Although, while I'm here I do have one question about something that wasn't explained fully in my book, which is the asterisk (*). What does it mean? For example:
(NSFetchedResultsController *)
NSString *sectionKeyPath

I think it is a little irresponsible for a text to give you code like that without explaining what a pointer is.

The asterisks are pointers. This is straight C, not Objective-C.

Pointers were one of the hardest parts of the C language for me to learn and it sounds like a lot of people have a hard time getting their head around it.

In addition to your current text, I strongly recommend picking up a C reference.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
I think it is a little irresponsible for a text to give you code like that without explaining what a pointer is.
The "Beginning iPhone Development" book assumes you are familiar with Objective-C and even says so in the Chapter 1 section "What You Need to Know Before You Begin".

The asterisks are pointers. This is straight C, not Objective-C.
True, but Objective-C is pretty useless without them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.