It seems that most init
methods in Objective-C now tend to return instancetype
instead of id
. See [UIView initWithFrame:]
, [UIViewController initWithNibName:bundle:]
, [NSArray init]
and siblings, etc. But initWithCoder
uses id
. Why is this? Has it just not been updated yet? Or is there a reason it has to be id
?
0
votes
instancetype
as of iOS 9/OX 10.11 – rmaddyinstancetype
is implicitly understood forinit...
anyways. – jscs