使用核心图形时,Swift和objective-c名称冲突

jac*_*ash 0 objective-c swift xcode6.1

使用Xcode 6.1,我突然收到此错误.

/...-Bridging-Header.h:5:2: note: in module 'CoreGraphics' imported from /...-Bridging-Header.h:5:
@import CoreGraphics;
 ^
Run Code Online (Sandbox Code Playgroud)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:271:1: error: definition with same mangled name as another definition CGPointMake(CGFloat x, CGFloat y)

它只发生在我CGPointMake从我的swift类调用时swift类使用在导入核心图形的桥接头中导入的objective-c类.

我已经清除了模块缓存和所有派生数据,并重新启动以获得良好的衡量标准.如果这不是在模块缓存中的错误和功能在两个地方定义的核心显卡,我不知道怎么和解决除了来自"只是不使用Objective-C的文件,"这就是我已经完成了同时解决它:/

flu*_*nic 5

不要CGPointMake在Swift中使用:

let point = CGPoint(x: 123, y: 456)
Run Code Online (Sandbox Code Playgroud)