button 左边图片右边文字样式
状态值 : 正常
状态值 : 选中
#pragma mark - buttonPress
- (void)buttonPress:(UIButton * )sender {
if (sender.tag == 130) {
if (!sender.selected) {
sender.selected = YES;
} else {
sender.selected = NO;
}
} else if (sender.tag == 131) {
if (!sender.selected) {
sender.selected = YES;
} else {
sender.selected = NO;
}
} else {
if (!sender.selected) {
sender.selected = YES;
} else {
sender.selected = NO;
}
}
- (void)buttonPress:(UIButton * )sender {
if (sender.tag == 130) {
if (!sender.selected) {
sender.selected = YES;
} else {
sender.selected = NO;
}
} else if (sender.tag == 131) {
if (!sender.selected) {
sender.selected = YES;
} else {
sender.selected = NO;
}
} else {
if (!sender.selected) {
sender.selected = YES;
} else {
sender.selected = NO;
}
}
}
posted on 2015-09-30 17:37 taiyang2014 阅读(476) 评论(0) 编辑 收藏 举报