I'm trying to create a var
without assigning a value when it's initialized. I'm new to swift
, coming from Objective-c
, and I'm having trouble using the wrapper/unwrapper. I have the following in my code:
var elapsedTime : NSTimeInterval!
self.elapsedTime -= (NSTimeInterval(hours) * 3600)
I get the following error at the second line:
Binary operator '-=' cannot be applied to operands of type 'NSTimeInterval!' and '(Double)'
What should I do to fix that, and why am I getting an error?