当我将静态框架(由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
有谁知道为什么缺少实例函数?我怎样才能访问单身人士?