我为我的tableView使用customCell。CustomCell包含UIButton.And我想用此按钮分配一个操作。TableView CustomCell UIButton ISSUE
BeginingCell.h持有偏角为的UIButton为:
#import <UIKit/UIKit.h>
@interface BeginingCell : UITableViewCell {
IBOutlet UIButton *ansBtn1;
}
@property(nonatomic,retain)IBOutlet UIButton *ansBtn1;
@end
和实现是:
//
// BeginingCell.m
// customCells
//
#import "BeginingCell.h"
@implementation BeginingCell
///########### Synthesize ///###########
@synthesize ansBtn1;
///########### Factory ///###########
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state.
}
///########### End Factory ///###########
- (void)dealloc {
[super dealloc];
}
@end
我用这CustomCell在tableView.I要从按钮点击的响应。如何为我的customCell按钮分配按钮动作?
什么是这里的buttonFrame? – 2011-04-19 04:20:24
你想要放置按钮的框架。它指定矩形的坐标,例如:0,0,20,20 – visakh7 2011-04-19 04:21:54
我在这里没有使用任何框架.BeginingCell是我的customButton类。并且我试图获得响应从它我在我的tableView显示我的customCell开始细胞 – 2011-04-19 04:31:27