零零乙
2014-06-02 20:05
采纳率: 50%
浏览 250

如何从 Swift 调用 Objective-C 代码

In the new Swift language from Apple, how does one call Objective-C code?

Apple mentioned that they could co-exist in one application, but does this mean that one could technically re-use old classes made in Objective-C whilst building new classes in Swift?

The Reasoning

Objective-C is a platform-independent language, whereas Swift is platform-dependent. Writing non-platform-dependent code (business logic libraries) in Swift would thus not be wise. However, writing platform-dependent code in it (interface related for example) would be perfectly fine. Not to say it would be a good idea, however it is definitely an interest.

转载于:https://stackoverflow.com/questions/24002369/how-to-call-objective-c-code-from-swift

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

15条回答 默认 最新

相关推荐 更多相似问题