swift 无头文件,都在.swift 文件里
创建项目选择语言为swift即可
导入文件
-
import Foundation
-
Remap certain Objective-C types to their equivalents in Swift, like
id
toAnyObject
-
Remap certain Objective-C core types to their alternatives in Swift, like
NSString
toString
-
Remap certain Objective-C concepts to matching concepts in Swift, like pointers to optionals
The model for importing Swift into Objective-C is similar to the one used for importing Objective-C into Swift. Swift vends its APIs—such as from a framework—as Swift modules. Alongside these Swift modules are generated Objective-C headers. These headers vend the APIs that can be mapped back to Objective-C. Some Swift APIs do not map back to Objective-C because they leverage language features that are not available in Objective-C. For more information on using Swift in Objective-C