Hacker News new | past | comments | ask | show | jobs | submit login
The best way to learn iOS Programming... well its working for me (plus.google.com)
100 points by kentf on Jan 27, 2012 | hide | past | favorite | 41 comments



To the OP, if you're there: Are you using XCode 3 or XCode 4? You referenced the TBNR guide book, but from what I read, it doesn't handle the new changes for Xcode. Did that cause any difficulties? (I was on the fence about buying the book last night because it's the older version, but after the OP's recommendation, I just bought it on Amazon).

I'm doing the same thing as the OP, starting around the same time, except I quit my job to take a break. And admittedly I'm spreading myself out pretty thin because I'm also trying to learn and get pretty knowledgable in Javascript and Python.

I have to say that learning iOS programming is very hard for me, mainly because I have almost no GUI experience. I did a bit of Win32 MFC programming about 15 years ago, so some of the concepts aren't completely foreign, but they might as well should be in some cases.

XCode is a terrible IDE and the error messages I've encountered are amongst the worst I've come across. I figure it will take time to internalize this stuff, but I can tell you it is fairly painful at the beginning stages!


Hey Steve,

I am happy to talk / vent about iOS programming with you. I know it's frustrating, but please stay with it.

I think they key is to use the book as inspiration but not as Gospel. I found that some of the interface things in the book didn't mesh with the new XCode. I had to play around until I figured it out.

I am happy to chat with you anytime about it, providing you catch me on Skype. My skye id: is kent.fenwick

Also, message me on Twitter and we can arrange a time to talk about it. I don't have all the answers, but I feel your pain and think I can give you some good pointers.

Good luck Steve!! All the best,

Kent


Thanks same to you, if I get stuck I'll definitely take you up on your offer!


Will do :)


Haha, I also set learning iOS as one of my 2012 resolutions AND I also bought TBNR after reading good reviews in Amazon. The 2nd edition covers Xcode 4 and iOS 4 (a bit outdated, but my target market is iOS 4+ anyway).

The shameful thing is, I haven't read the book yet, and instead go with Titanium since I'm more familiar with JavaScript (not really, but better than zero experience with Objective-C). It's been a couple of days, and things are doing good (but debugging sucks).

I eventually will learn iOS/Objective-C, but since I come from Java, and I don't like Xcode (I've played around a bit) I will most likely use AppCode from JetBrains.


I really think you should stick it out and learn XCode. I am not a huge fan wither, would rather use TextMate or BBEdit, but once you stick with it, you will get there.

If we do the things we have to do long enough, the day will come when we will get to do the things we want to do.


Don't laugh but I've bought both versions of TBNR... still not even close to shipping


I started learning ios development around 2 week ago. Initially it looked very alien to me. I already know C, C++, C# and Java but not objective-c. The language itself is easy to learn but learning the framework took some time. Now I am much confident and just started my first app. Probably I will be able to finish my first app in a week.

BTW, I am also new to MAC platform and sometime finding using the MAC itself is tedious. I use windows at work and was using Linux at home. Now using mac at home.


I find ARP handles all my MAC needs just fine, I rarely have to look at them.


The big nerd ranch forums have the differences since the book was published and what is in the latest version of Xcode. Check it out.


For me delegations was fairly easy to understand, in a nutshell, you "borrow" events from a class to be implemented and triggered by your own class.

For me, the worse part of Objective-C was memory management, the rules are simple if you alloc you must dealloc, but memory leaking was always a problem, but now we have ARC and it free us from this.

What I would really like to know, and I've never seen it in a book/tutorial explaining in detail, is, how do you skin or create costume buttons for your interface.

How do you create/code an interface like http://dayoneapp.com/ ? I don't mean the graphics, but how to implement a template or design.

If any of you know, it would be awesome ;)


A book I heard about via Matt Gemmell is "Learning iPad Programming" (Kirby Turner, Tom Harrington) - it's really an excellent overview, explained by programming a real-life iPad app step by step. Massive coverage of tons of major topics. http://www.amazon.co.uk/gp/product/0321750403

Also, as others mention, the Stanford lectures are awesome, especially combined with the iTunesU iPad app.

And finally, for me the breakthrough into iOS programming came when I went to a hackathon and pair programmed with a total iOS pro, I learned WAY more in a few hours than I did reading a bunch of tutorials.


Good job! The goal is here is to keep pushing yourself. What will happen is that the next app will build on the skills you learn in the current app and so on.

Once you finish your first app, I'd look into some open source projects and see how they are built and learn from them. It accelerates your learning, but you need the basics first.

TBNR and the iOS Docs are a great place to start, but there's nothing like just jumping right in. :)

Also a word of advice: Making the app is only 50% of the work if you are expecting to make significant income from the app.


Having released my first app at the end of October, I can confirm building the app is at the highest "only 50%". Having had very little interest for it. (less than 10 buys) I now fully understand marketing has a much larger role than a developer like me would have liked. 2012, I will learn iOS, yet I will also learn marketing. My first app was created with Titanium too, yet I feel it is important to learn iOS.


Maybe you could tell us what your app is? I tried looking to your blog without success. If I'd have found it you might have made another sale.


The name is "wordpoke". http://itunes.apple.com/us/app/wordpoke/id471756627

I use the app every day as I built it for me first, the internet second.

A blog post is in draft, waiting the "first update" as its all part of the learning curve I wanted to cover in my journey into iOS development.

A new update to the app will be arriving within 10 days, Apple willing. ( It was interesting to learn how to tackle upgrades to the database. )

Issues can be reported and progress can be viewed: https://github.com/freshteapot/wordpoke/issues

New features are not on that list.

The webpage for "wordpoke" is http://wordpoke.me

On the way to work, I realised I should and now will add it to my profile.


Just a thought - the screenshots look really great, but you will definitely want to write a much longer app description. I would NEVER buy the app based on that description alone since it is $3 and I don't even fully understand what it's for. Why would I want to be reminded of certain words? Is it like a flashcard app?


Thanks for the encouragement!

I agree on the 50% part. I am ready to my part on the next 50%!


I just can't break through delegation. Any suggestions? I do have many years of programming experience (C, Perl, some JS), but can't quite grasp delegation.


Apple has their description of delegation here: http://developer.apple.com/library/IOs/#documentation/iPhone...

Delegation is a design pattern in which one object sends messages to another object that has been specified as its delegate, to ask for input or to notify the delegate that an event is occurring. The delegate object responds to these messages in a custom way. Delegation is a common design pattern in Cocoa Touch apps because it allows you to provide custom behavior without having to subclass and override the methods of a complex framework object, such as UIApplication.

It's probably confusing, really, to read about the delegation "design pattern" as on Wikipedia. Instead, it's mostly just a way to avoid subclassing: specify another object, the "delegate", to provide the information or react to an event, rather than do something like subclass and override specific methods for an event.

I hope that helped, maybe a tiny bit. If not, here's a +15 voted answer on Stack Overflow about it: http://stackoverflow.com/a/1792862/188512


The way I explained delegates to a friend is:

You have this friend, lets say his name is Steve. Steve is a really good guy, and usually excited to hear about what you're working on - and to help out, if he can. He also happens to be really smart and knows everything about everything. He read the dictionary when he was young and continues to read wikipedia daily. So you talk to him when you need to do something[1]. Or maybe you did something and are really excited about it[2]. Perhaps you're about to do something and just need that one last piece of the puzzle before you can finish it up[3]. And if you're unsure about if an idea is worth perusing, Steve is the right person to talk to[4].

Another reason why you're such good friends with Steve is that he is an animal lover and has promised that if you ever call on him to watch your dog because you just need to take a vacation for a weekend, he will watch your dog[5] for you. Since Steve is an animal lover, he might also be able to watch your pet ferret[6]. However, Steve is allergic to cats, and much to his dismay, he cannot watch your cat for you. But, you understand. You can post a notification on Twitter to ask all your other friends if any of them can watch your cat for you[7, 8].

Steve is a delegate. There's only one of him. You only need one.

[1-4]. Some examples of when you would use a delegate

5. Protocols can have some methods that their delegate is required to implement, and the compiler will error if they are not implemented.

6. Some methods are optional to implement.

7. Since a method can be optional, it might not be implemented.

8. Notifications are another way for objects in Objective-C to talk to one another. Instead of a 1:1 mapping, they are a 1:Many mapping.


It's (mostly) just events. Look at how many delegate methods contain the words "did" and "will".

Object A is going through its life cycle, doing what it does. Certain events there trigger delegate messages. Object B, A's delegate, receives these and does things, or not, as desired, based on the event.


It's an event system, what you would use function pointers for in C. I think its clearer to be specific and call delegates 'an implementation of the observer design pattern', rather than a design pattern in itself. Other implementations include the class GoF way with subclassing, or typesafe callback abstractions like libsigc or boost::signals in C++. In dynamic languages you'd just store an array with strings of function names to call, or object/method name pairs of methods to call.


Well said. Observer is how I got my head around it also.


The basics of delegation is that you have classes that could be written so that you must subclass them to do any interesting work. The delegate pattern is such that you have some functions that affect the operation of the sub class(like filling a table full of data) so that it can be customized without subclassing.

To delegate is to give responsibility to a subordinate. That's what you are doing; giving some control to a owning class. (not superclass)


Great Job OP. I left my full-time job last year to become an iOS Developer. Best decision I have ever made. IOS Programming Version 2 is the best book out there, so you are on the right track.

I would also highly recommend the Stanford iTunes U Courses. http://itunes.apple.com/us/itunes-u/ipad-iphone-application-...

If you are using Xcode 4.2 the differences from the iOS Programming book are kinda tricky. I plan on posting the updated steps in the coming weeks. In the mean time, feel free to reach out to me at Steve @ Bixbyapps.com.

Thanks OP and Congrats.


I completely agree with the premise that once you get past the initial scare, it really is very easy(assuming a programming background). I also set myself a goal of submitting an app by a deadline. I got to the day of the deadline, panicked because I hadn't submitted anything and wrote an app which totalled < 100 lines and took about 1.5 hours to write. 170k downloads later I'm thoroughly proud of the truly awful app I've made. Really worth the time investment both financially and emotionally


In your experience, does the BNR guide translate well into iOS 5 and Xcode 4.2's ARC?


Great Question.

Yes it does!

But I am not using Storyboards.


I'm using the same book too, the next edition should come out sometime in march and they also made a book about cocoa programming that follows the same approach (it covers lion too).


The real problem is not learning iOS, the real problem is unlearning all the java you know lol.

After you are done try learning C pointers first.

Sorry but I have to vent out my frustration of reading and fixing pathetic Objective C written by java programmers!


Good luck! And check out http://cocoacontrols.com/ (shameless plug alert, etc)


Thanks for the link. I found some interesting controls.


I'm a long-time Hacker News reader who signed up, finally, to post this comment: What's this worthless post doing wasting my attention on Hacker News?


iOS-specific tips aside, I found the post helpful for anybody looking to start side-projects out of their comfort zone.


Thanks!


haha ouch... point taken :)


I actually found this post inspiring and your comments in thread have been helpful with BNR


If you are a long time reader you surely must have heard of all this "social bookmarking" thing.

Basically HN readers post articles, and then vote on them. Crazy, I know, the kids these days. Anyway, that's how this article got on Hacker News, and that's why nobody gives a flying duck about your "attention being wasted".

Thus, your sense of entitlement is extremely arrogant, not to mention that your comment was rude. Besides forgetting that HN offers what the HN readers vote on, you also forget that you are perfectly free to skip anything you don't like.


(I should note that I don't agree with you about the blog post, but that isn't that important.)

You have missed an important point about HN -- the comments are usually more interesting than the articles. I have up voted lots of meh articles for the comments.


Its going to cost me some karma but I have to agree with you. Really fluffy content, almost has a self-help feel to it. Don't get me wrong, its as worthy as most blog posts to be on the internet, but getting submitted to HN and being a top post? Maybe there are a lot of HNers that have gotten beaten up by iOS and can sympathize.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: