开发者

Why Should I Use Retain With Convenience Methods?

开发者 https://www.devze.com 2023-01-03 14:30 出处:网络
I am using the this code in my iPhone application: UIButton * MyButton=[UIButton ButtonWithType:UIButtonTypeRoundRect]retain];

I am using the this code in my iPhone application:

UIButton * MyButton=[UIButton ButtonWithType:UIButtonTypeRoundRect]retain];

If I don't use this retain will my app cra开发者_如何转开发sh? What is the function of this retain?


You should retain because the UIButton object returned from the call is autoreleased.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号