I am learning how to create custom INIT in Objective-C. There seems to be 2 ways to do so. Is there any difference between these two ways to create a custom init?
//First way of creating a custom init uses instancetype
-(instancetype) init
{
self = [super init];
if (self) {
//initialization code here
}
return self:
}
//Second way of creating a custom init uses ID
- (id)init {
self = [super init];
if (self) {
//initialization code here
}
return self;
}