开发者

Why Should I Use Retain With Convenience Methods?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜