我应该学习iOS的Swift还是Objective C [英] Should I learn Swift or Objective C for iOS

查看:36
本文介绍了我应该学习iOS的Swift还是Objective C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚学习了目标c,目的是为iOS构建应用.实际上,本周我第一次尝试使用某个应用程序时便开始进行修改,我对Swift并不了解,而是在WWDC上阅读文本博客.

I've just learnt objective c for the purpose of app building for iOS. In fact i started tinkering this week with my first attempt at an app, I was unaware about Swift and I am reading the text blog on the WWDC.

展望未来,我现在应该使用Swift而不是Objective C来构建应用程序吗?语言是否相当相似?

Going forward, should I be looking to build apps in Swift rather than Objective C now? And are the languages fairly similar?

我之所以这么问,主要是因为我刚刚学习了Objective-C的语法并且几乎没有使用它,因此将它们放在一起对我来说并不是什么大不了的事情.更重要的是,我使用了正确的语言.几个月前,我才有了第一台Mac,而我对Apple的经验还不多,所以我想我应该去一个地方,那些经验丰富的人可以为我指明正确的方向.我不知道Swift是否意味着很有可能在某个时候完全删除Objective-C.

I ask mainly because I've only just learnt the syntax for Objective-C and done little playing around with it, so dropping it all together isn't too much of a big deal for me. What's more important is that I use the right language. I got my first mac only a few months ago and I've not had much experience with Apple so I thought I'd go to place where people who are far more experienced all round could help point me in the right direction. I don't know if Swift means that it's likely Objective-C will be dropped entirely at some point.

推荐答案

此答案无法经受时间的考验,但直到今天:

This answer won't stand the test of time, but as of today:

  • Objective-C将在很长一段时间内得到支持. (Apple有大量的Objective-C源代码,因此不会很快移植到Swift.)
  • 几乎所有iOS教程,示例和书籍都使用Objective-C.
  • 您可能要使用的几乎所有特定于iOS的第三方源代码都是在Objective-C中实现的.
  • 使用Objective-C中的C和C ++库比使用Swift中的C.C ++库更容易.
  • 您可以从许多Objective-C专家那里获得帮助. Swift专家很少.
  • Swift语言及其标准库目前没有很好的文档记录.

暂时粘贴Objective-C.如果您对iOS SDK感到满意,并且对Swift的记录更好,则可以考虑学习Swift.

Stick with Objective-C for now. When you're comfortable with the iOS SDK and Swift is better documented, you can consider learning Swift.

已经四个月了,对此我的看法没有改变.如果您正在寻找更近期的答案,请立即咨询并回答此Hacker News主题: Swift是否已准备好进行生产?

It's been four months and my opinion on this hasn't changed. If you're looking for a more recent answer, this Hacker News thread was asked and answered today: Is Swift ready for production?

这篇关于我应该学习iOS的Swift还是Objective C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆