iPhone init method return type

Posted by William Jockusch on Stack Overflow See other posts from Stack Overflow or by William Jockusch
Published on 2010-03-19T22:39:51Z Indexed on 2010/03/19 22:41 UTC
Read the original article Hit count: 283

Filed under:
|

Suppose we are writing a class (let's call it Class) in an iPhone program. In all the samples out there, the init methods are typically declared like this:

-(id) initWithFoo: (Foo *) foo

My question is: would it be more logical to do the following? Why or why not?

-(Class *) initWithFoo: (Foo *) foo

© Stack Overflow or respective owner

Related posts about iphone

Related posts about initialization