-
could not execute support to read Objective-C lass data in the process.This may reduce the qulity avaliable.
懒加载,重写set方法,不能使用self,否则会报上面的错
-
自定义UITableViewCell,向其中添加button,button的点击事件无法响应
I faced a similar issue. I was programmatically adding an
UIButton
to theUITableViewCell
viaaddSubview
. The button would not respond to touch events. Using Debug View Hierarchy, I finally discovered that any subviews added to theUITableViewCell
was behindcontentView
, which was blocking user input from reaching theUIButton
. The issue was resolved by adding theUIButton
tocontentView
instead of theUITableViewCell
.这是因为向cell addSubview:button button会被cell自带的contentView挡住,应该向cententView添加subview