How hard will it be to transfer from my existing expertise in C# to building apps for the iPad/iPhone in Objective C?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- CALayer - backgroundColor flipped?
- 求获取指定qq 资料的方法
The language jump is OK. Once you get past the initial shock of
[
and]
. However, the libraries and Framework shock will be substantial.The Cocoa and Touch frameworks are significantly lighter when compared with .Net Framework, so at least you can look at the bright side, you have less to learn. But their underlying philosophy, layout and historic evolution path is very different from the C#/.Net framework. Whether this will be easy or hard, is difficult to appreciate. Some personal opinions:
Many of the areas covered poorly in Cocoa have various 3rd party libraries, but I can't enter into comparison all Cocoa 3rd parties vs. .Net 3r parties, I have a life...
Overall, I would sum it up shortly as In Objective-C the entry bar is higher. Bring a brain.
The language isn't difficult but I found the development environment isn't quite as slick as VS in a few ways. For instance the interface builder is a distinct application to the coding environment leading to occasional synchronisation issues, and the compiler won't tell you if you typed an event name incorrectly.
Having said that the interface builder is gorgeous. You just need to remember to hit the save button before you flip back to the code.
In addition to Remus's terrific answer, you will also need to understand and be able to implement memory management. If you grew up on Java or .NET, this may be alien to you. Pay very close attention to this part of the tutorials, and practice this by intentionally screwing it up. You need to know what these errors look like and how they behave.
Good luck!
I think if you know OOP you will be fine. The synthax is not usual as most programming languages though, e.g.
object.function(var arg1)
looks like
[object function[var:arg1]]
if I remember correctly.
If you have an Apple Dev ID and iTunes, you could go to http://developer.apple.com/iphone/index.action then go to the Getting Started videos (after which it should ask your Apple Dev ID at some point then launch iTunes). There you have a bunch of videos. The one called "Introduction to Objective-C and Cocoa Touch" can be a good start to look at.
Hope that helps.
It's a decent sized jump, but you can learn enough to get up to speed in a few days.
Once you get the Objective C syntax and conventions down, you'll have to delve into the Cocoa libraries and frameworks, which are pretty substantial.
I would recommend getting a book on Objective C or iPhone development, or going through all the tutorials on the http://developer.apple.com site.
Once you get going, check out this site for good code examples for applications: http://appsamuck.com