// // YOUPAILCGPSCityCell.m // LiveChat // // Created by 张灿 on 2018/4/21. // Copyright © 2018年 caicai. All rights reserved. // #import "YOUPAILCGPSCityCell.h" @implementation YOUPAILCGPSCityCell - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { self.selectionStyle = UITableViewCellSelectionStyleNone; self.backgroundColor = [UIColor clearColor]; [self youpaifinitUI]; } return self; } - (void)youpaifinitUI{ self.youpaipcityLabel = [[UILabel alloc]init]; self.youpaipcityLabel.font = LCFont14; self.youpaipcityLabel.textColor = LZ273145Color; self.youpaipcityLabel.textAlignment = NSTextAlignmentLeft; [self.contentView addSubview:self.youpaipcityLabel]; [self.youpaipcityLabel makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.left).offset(15); make.top.equalTo(@14); make.height.equalTo(@20); }]; self.youpaipgpsBtn = [[UIButton alloc]init]; self.youpaipgpsBtn.titleLabel.font = LCFont15; [self.youpaipgpsBtn setTitleColor:LZ273145Color forState:(UIControlStateNormal)]; [self.youpaipgpsBtn setTitle:@"获取定位" forState:(UIControlStateNormal)]; [self.youpaipgpsBtn addTarget:self action:@selector(youpaifgpsBtnClick) forControlEvents:(UIControlEventTouchUpInside)]; self.youpaipgpsBtn.uxy_acceptEventInterval = 3.0; [self.contentView addSubview:self.youpaipgpsBtn]; [self.youpaipgpsBtn makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.right).offset(-15); make.top.equalTo(@9); make.height.equalTo(@30); }]; } - (void)youpaifgpsBtnClick{ if (self.youpaipblock) { self.youpaipblock(); } } @end