开发者

Throws uncaught exception while adding subview in a table row

开发者 https://www.devze.com 2023-01-13 15:33 出处:网络
[checkButton1 addTarget:self action:@selector(selectorClicked:) forContr开发者_开发知识库olEvents:UIControlEventTouchUpInside];
[checkButton1 addTarget:self action:@selector(selectorClicked:) forContr开发者_开发知识库olEvents:UIControlEventTouchUpInside];
[cell.contentView addSubview:checkButton1];
[checkButton1 release];

Line 2 throws uncaught exception. Do you have any idea? If i comment line 2 it works fine but also doesn't add view into subview.

Thanks,

Amit Singh


Have you initialize the button object?

0

精彩评论

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