What am I doing wrong? I have a Class with a variable that is a struct and that works perfectly. However I also have a variable within the struct that is of type another struct. When I declare that variable (the second level struct) it keeps asking me to provide the variables.. I just want them blank and I will set them or send them values later.
ERROR TEXT:
Missing argument for parameter 'SV_StinkLocation_Longitude' in call
Calling Code:
struct SV_StinkDetails_Model{
var SV_StinkDetails_Description:String = ""
var SV_StinkDetails_RecordingDate:NSDate! = NSDate()
var SV_StinkDetails_Location:SV_StinkLocation_Model! = SV_StinkLocation_Model()
}
ERROR LINE
var SV_StinkDetails_Location:SV_StinkLocation_Model! = SV_StinkLocation_Model()
Struct Code:
import Foundation
import UIKit
import CoreData
import AVFoundation
import CoreLocation
struct SV_StinkLocation_Model{
var SV_StinkLocation_Longitude:NSNumber!
var SV_StinkLocation_Latitude:NSNumber!
var SV_StinkLocation_Suburb:String!
var SV_StinkLocation_State:String!
var SV_StinkLocation_Country:String!
}
However it works fine when I make the details struct a class variable.
var SV_Stink_StinkDetails:SV_StinkDetails_Model! = SV_StinkDetails_Model()
What am I doing wrong?