开发者

Android developer moving to iOS - What do I need to know?

开发者 https://www.devze.com 2023-02-06 19:24 出处:网络
I\'m interested in s开发者_StackOverflow中文版tarting developing on the iOS platform, after a couple of years of Android work. What are the main things that are likely to trip me up when designing/cod

I'm interested in s开发者_StackOverflow中文版tarting developing on the iOS platform, after a couple of years of Android work. What are the main things that are likely to trip me up when designing/coding for iOS instead of Android?


I have done some iphone apps after doing Android.

  • Objective-c is just another language; not at all hard to learn.
  • Understand how iPhone memory works. How the ref count and AutoreleasePools stack works. This should be the most important thing to learn.
  • You will love the interface builder. Creating a new screen for the iPhone is much easier.
  • iPhone's version of the Android ListView is called a TableView. More or less the same but you need to define an amount of sections.
  • I love how iPhone devs use the Delegate pattern, I am using it in Android now. Pay attention to that.
  • Resources can have their own folders. For example: A drawable can be in /car/model/drawable
  • Adding animation to iphone objects is VERY easy. You will notice that a lot of methods have a last parameter with BOOL animated.
  • Creating custom components is easier.

Things that made me lose a lot of time:

  • You can send msgs to NIL.
  • Logs are not as friendly as Android's.
  • You need to add every file to the project. It's not just putting it in the correct place.
  • Updates to the env means downloading 2GB every time.
  • When printing logs with NSLog, NSString needs to use %@ not %s.
  • Xcode has some strange behavior. The cursor moves around your screen.
  • Merging commits in iPhone source is hard. The project file and the xibs always get conflicts.


I just want to say that Dont use Interface Builder, Try to make application through coding with this you will easily catch the building process for IPhone program.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号