I have seen if(self = [super init])
, but I recently came across some code that tests for equality rather than makes an assignment, e.g. if(self == [super init])
. What is the purpose of this code, and how does it contrast with if(self = [super init])
?
For context, this is the entire function:
- (id)initWithDelegate:(id<BSForwardGeocoderDelegate>)aDelegate
{
if (self == [super init])
{
delegate = aDelegate;
}
return self;
}