这是我的代码
UIImageView *bgDetails = [[UIImageView alloc] initWithFrame: CGRectMake(0, 20, 320, 47)];
bgDetails.image = [UIImage imageNamed:@"bgDetail"];
UIButton *btnLike = [UIButton buttonWithType:UIButtonTypeCustom];
[btnLike setBackgroundImage:[UIImage imageNamed:@"38_38"] forState:UIControlStateNormal];
btnLike.frame = CGRectMake(278, 4.5f, 37, 37);
[btnLike addTarget:self action:@selector(doLike:) forControlEvents:UIControlEventTouchUpInside];
[bgDetails addSubview:btnLike];
[cell.contentView addSubview:bgDetails];
但btnLike
不调用doLike
方法。请帮我!谢谢!