I have two classes using as singletons.
class Boss {
static let sharedInstance = Boss()
private init() {}
var user_id : String?
var username : String?
}
class Job {
static let sharedInstance = Job()
private init() {}
var job_id : String?
var JobType : String?
}
But after populating the Boss.sharedInstance first, Job.sharedInstance also containing Boss' class variables. But after replacing the sharedInstance with other name (for eg. job_sharedInstance and boss_sharedInstance) respectively, things are working fine. It's quite weird. Can anybody explain me the reason why it would happen like this. Thanks in advance.