I'm trying to convert over my Objective-C to Swift - a little confused on the error here and how to take care of it. I've been reading through the documentation but still confused - this was generated from a converter. Anyone have any ideas?
Objective-C
- (id) init
{
self = [super init];
if (!self)
return nil;
self.cmRequestsQuery = [[NSMutableArray alloc] initWithCapacity:5];
self.cmQueryIsRuning = NO;
self.requestCounter = 0;
self.serverOfflineOrBadResponse = NO;
self.userWasLoggedIn = NO;
self.needToSendPushNotiToken = NO;
self.noInternetConection = NO;
self.needToUpdateToken = NO;
[[reqOperationManager sharedManager] setDelegate:self];
return self;
}
Swift
func init() -> AnyObject {
self = super()
if !self {
return nil
}
self.cmRequestsQuery = NSMutableArray(capacity: 5)
self.cmQueryIsRuning = false
self.requestCounter = 0
self.serverOfflineOrBadResponse = false
self.userWasLoggedIn = false
self.needToSendPushNotiToken = false
self.noInternetConection = false
self.needToUpdateToken = false
reqOperationManager.sharedManager().setDelegate(self)
return self
}