单例实例函数缺失

时间:2015-08-03 10:28:22

标签: ios objective-c swift swift2

当我将静态框架(由OC实现)导入swift项目时。我发现我的单例实例函数丢失了。

@interface WANetworkEngine : NSObject

+ (WANetworkEngine *)engine;
- (NSOperation *)sendRequestWithService:(WABaseService *)service
                                success:(void (^)(NSOperation *operation, id responseObject))success
                                failure:(void (^)(WAError *error))failure;
- (void)cancelAllOperation;

@end

自动翻译为swift:

class WANetworkEngine : NSObject {
    func sendRequestWithService(service: WABaseService!, success: ((NSOperation!, AnyObject!) -> Void)!, failure: ((WAError!) -> Void)!) -> NSOperation!
    func cancelAllOperation()
}

Xcode7.0 beta,swift2.0
有谁知道为什么缺少实例函数?我怎样才能访问单身人士?

0 个答案:

没有答案