I have a singleton object which has some properties and I would like to set all these values to nil or "NO" based on the type of properties. One way to do it is to write a reset method in which I set all these properties to nil myself like below..
This may even have instance variables which are also to be cleared.
-(void)reset
{
//Properties
self.lastLoggedInUser = nil;
self.localMasterDownload = NO;
self.isFirstLaunchDone = NO;
self.lastArchvingDate = nil;
self.archivingDueDate = nil;
self.dbEncryptionKey = nil;
self.checkInDone = NO;
//Instance variables
_isPostionModuleExtandedMode = NO;
_isPassengerModuleExtandedMode = NO;
}
But I am looking for a more generic and efficient method of doing this..
Any help is appreciated.
Thanks.