一:首先声明一下
UIButton *sexManBtn;//性别选择 男
UIButton *sexWomanBtn;//性别选择 女
UILabel *sexManLabel;
UILabel *sexWomanLabel;
BOOL sexOk;
二:初始化
sexOk = YES;
三:UI布局
sexManBtn = [UIButton buttonWithType:UIButtonTypeCustom];
sexManBtn.tag = 1000;
sexManBtn.frame = CGRectMake(125, 12, 20, cell_Height - 24);
[sexManBtn setImage:IMAGE(@"select2_b") forState:UIControlStateNormal];
[sexManBtn setImage:IMAGE(@"select2_a") forState:UIControlStateSelected];
[sexManBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
sexManLabel = [[UILabel alloc] init];
sexManLabel.frame = CGRectMake(150, 5, 20, cell_Height - 12);
sexManLabel.backgroundColor = [UIColor clearColor];
sexManLabel.textAlignment = 0;
sexManLabel.textColor = [UIColor blackColor]