Objective C/Cocoa Learning curve
Lately I have been getting pretty motivated to learn Objective-C and it’s been a fun process so far. However, having done Ruby and rails for over a year now, it’s definitely a challenge to grasp Objective-C. Ruby definitely spoils you, and I feel I have fallen in that trap and now slowly trying to get out of the hole. On more than one occasion I have been tempted to do this:
UIImageView *image = [self findImage:touchLocation];
image.methods
Then I recall this is not ruby,
Of course, there’s the quick ‘Jump to definition’ feature of Xcode that helps a lot.
As far as the convention quirks goes, it took me a while to whether use BOOL values as YES/NO or TRUE/FALSE or true/false. I switched back and forth for a while going by forums and what not, I was doing things like:
valid_move = YES
if valid_move == YES
Until I found a sample code from ADC, and they use it like:
valid_move = YES
if (valid_move) //How convenient, why not just set value as TRUE, I still don’t get the YES/NO macros for BOOL. Actual value stored is either 0 or 1 of course. Oh well, if it’s coming from sample code, I might as well follow the same convention. The challenge so far has been just getting used to the syntax and getting used to convention more than anything and also brush up on C pointers.
Although there are few blogs/tuts on iphone sdk and objective-C, I think the sample codes from ADC are the best source to learn what the SDK has to offer and how to use all the libraries. Besides getting hand of coding style, convention, just running the sample codes locally gives a better understanding. I was tempted to buy a iPhone app book from pragmatic programmer’s but decided not to. The ADC guidelines, code samples, floating tuts and my objective-C book should keep me busy for a while.
June 15th, 2010 at 11:24 pm
Хорошего Вам дня! ian@elektrashop.ru” rel=”nofollow”>……
с ув….
June 16th, 2010 at 3:42 am
Добрый день! thomas@sotkashop.ru” rel=”nofollow”>……
С уважением,…
June 17th, 2010 at 12:57 pm
Добрый день! jake@avtogazik.ru” rel=”nofollow”>……
с ув….
June 19th, 2010 at 9:48 am
Добрый день! jose@tehnon.ru” rel=”nofollow”>……
с ув….
August 7th, 2010 at 12:44 am
Made a movie about this, would you and anyone else here consider checking it out real fast and let me know your opinion? I left the link in the website field, hope you can access it. I’d appreciate it greatly, thank you