Moving from C# on Windows to Objective-C on Mac
I'm going to be getting my first Mac computer soon, and I want to learn Objective-C. I already have experience in C#, and I've already started learning C++, but absolutely everything in Objective-C confuses me, including memory management. Do you have any tips on moving from C# to Objective-C? I've read that I should learn C++ before learning Objective-C, but so far C++ looks a lot like C# which looks very different from Objective-C.
Edit: For the people trying to learn from this question, I HIGHLY recommend buying the "Learn Objective-C on the Mac" book by Apress. It's very well written if you're coming from a C-like langu开发者_高级运维age (like C, C++, C#, Java, PHP, etc.)
Learn Objective-C directly. No need to learn C++ first. The two are completely different in all aspects that seem to confuse you.
Also understand that for writing functional applications on the Mac, your focus will be more on learning and understanding the Cocoa API than Objective-C itself. Objective-C can be picked up in an afternoon by an experienced programmer. Cocoa takes more time.
For the purpose of learning Cocoa (and Objective-C at the same time), I recommend "Learn Cocoa on the Mac". It's the book most developers on our team used to get started.
If your focus is on iOS development instead, you'll need to learn Cocoa-Touch. I learned it using Beginning iPhone 4 Development, which I can recommend.
Josh Smith of joshsmithonwpf.wordpress.com made the switch to iOS a couple of years ago.
He just published a book: iOS Programming for .NET Developers
Here is the write up on it:
This book is a field guide for .NET developers exploring the foreign world of native iOS programming. It explains the iOS development platform by comparing and contrasting it with tools, APIs, and concepts familiar to .NET developers.
The author, Josh Smith, was a Microsoft MVP for four years thanks to his technical and written contributions in the Client Application Development community. He has worked on enterprise iOS applications since 2010. This is the book he wished had existed when he started learning iOS.
Here is the link to his new blog on iOS: ijoshsmith.com
And his new book: iosfordotnetdevs.com
Good luck - I have found Objective C to be really weird at first :)
精彩评论