ios - Any caveats using [UIView new];? -
being thought always use designated initializer feel bit dirty when creating new viewinstances [uiview new];
rather [[uiview alloc] initwithframe:cgrectzero];
?
is there any reason not this? there practical difference @ all? if creating new view-instance without frame information wouldn't fallback [uiview new];
cut away lot of code-cruft? guess [[uiview alloc] initwithframe:cgrectzero];
called under hood anyways(?)
[uiview new]
convenience method replace [[uiview alloc] init]
is1 different [[uiview alloc] initwithframe:cgrectzero]
is there reason not this?`
in case, i'd "yes". can't guarantee init
equivalent initwithframe:cgrectzero
in case.
my guess ...
it's possible correct , 2 act identically; isn't future proof. implementation details may change.
1. might different, don't know initwithframe:
under hood.
Comments
Post a Comment