Why UIButton does not require to alloc and init call instead we use only
UIButton *myBtn = [UIButton buttonWithType:UIButtonTypeCustom];
.
This may be a simple question but i don't know the correct answer for this, does anybody can help? Any help is appreciated,thanks in advance.
Well the buttonWithType will return a type of UIButton which is alloc
and init
for you. It is also autoreleased.
You can als alloc
and init
a UIButton your self, this will give you an UIButton of type UIButtonTypeCustom
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With