【发布时间】:2014-06-04 12:48:04
【问题描述】:
由于 Swift 支持与目标 c 的混合匹配,那么我们是否可以使用它来构建部署目标小于 iOS 7 的应用程序。
来自Swift Prerelease Documentation 在基本设置部分我读到的是:
Swift is designed to provide seamless compatibility with Cocoa and Objective-C. You can use Objective-C APIs
(ranging from system frameworksto your own custom code) in Swift, and you can use Swift APIsin Objective-C.
This compatibility makes Swift an easy, convenient, and powerful tool to integrate into your Cocoa app
development workflow.
This guide covers three important aspects of this compatibility that you can use to your advantage when
developing Cocoa apps:
● Interoperability lets you interface between Swift and Objective-C code, allowing you to use Swift classes
in Objective-C and to take advantage of familiar Cocoa classes, patterns, and practices when writing Swift
code.
● Mix and match allows you to create mixed-language apps containing both Swift and Objective-C files that
can communicate with each other.
● Migration from existing Objective-C code to Swift is made easy with interoperability and mix and match,
making it possible to replace parts of your Objective-C apps with the latest Swift features.
所以读完这篇文章后,我想到的问题是
- 我们可以在我们当前工作的应用程序中使用 swift 在。
- 如果答案是否定的,那么它将与上述矛盾 解释。
【问题讨论】:
标签: ios objective-c swift