I am just wonder what is the difference between [[UIImageView new] init] and [[UIImageView alloc] init] .
is memory allocated in [[UIImageView new] init] as well ?
I am just wonder what is the difference between [[UIImageView new] init] and [[UIImageView alloc] init] .
is memory allocated in [[UIImageView new] init] as well ?
+ new
is equivalent with + alloc
followed by - init
, so
UIImageView *iv = [[UIImageView alloc] init];
and
UIImageView *iv = [UIImageView new];
are right (and equivalent) and
UIImageView *iv = [[UIImageView new] init];
is wrong, since it calls - init
twice.