穿越农家锦鲤小福女小说全文免费
【地反腐倡廉种菜,样样样样样样样样小说样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样样 0:不是 1:是
if (self.shopModel.isShowMessage) {
UIHUD_TOAST(@"你已经是商家了")
return;
}
self.isZK = NO;
[self.teamBtn setTitleColor:RGB(153, 153, 153) forState:UIControlStateNormal];
[self.teamBtn setBackgroundImage:[UIImage imageNamed:@"shiwu_zhaopin_no"] forState:UIControlStateNormal];
[self.dealBtn setTitleColor:RGB(153, 153, 153) forState:UIControlStateNormal];
[self.dealBtn setBackgroundImage:[UIImage imageNamed:@"shiwu_baoming_no"] forState:UIControlStateNormal];
self.stepView.hidden = NO;
self.detailView.hidden = YES;
self.shopView.hidden = YES;
[self.tableView reloadData];
}
//点击报名
- (IBAction)onClickDeal:(id)sender {
self.isZK = YES;
[self.dealBtn setTitleColor:RGB(255, 0, 0) forState:UIControlStateNormal];
[self.dealBtn setBackgroundImage:[UIImage imageNamed:@"shiwu_baoming_selected"] forState:UIControlStateNormal];
[self.teamBtn setTitleColor:RGB(153, 153, 153) forState:UIControlStateNormal];
[self.teamBtn setBackgroundImage:[UIImage imageNamed:@"shiwu_zhaopin_no"] forState:UIControlStateNormal];
self.stepView.hidden = YES;
self.detailView.hidden = NO;
self.shopView.hidden = YES;
[self.tableView reloadData];
}
#pragma mark - tableView的代理方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
if (self.isZK) {
return 2;
}else{
return 1;
}
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (self.isZK) {
if (section == 0) {
return 1;
}else{
return 10;
}
}else{
return 10;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
return 70;
}else{
return 50;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
static NSString *ID = @"IMInfoHeadTableViewCell";
IMInfoHeadTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
if (cell == nil) {
cell = [[NSBundle mainBundle]loadNibNamed:@"IMInfoHeadTableViewCell" owner:self options:nil].lastObject;
}
[cell.headImageView sd_setImageWithURL:[NSURL URLWithString:self.model.headUrl] placeholderImage:[UIImage imageNamed:@"logo"]];
cell.nameLabel.text = self.model.nickname;
if (self.model.sex == 0) {
[cell.sexImageView setImage:[UIImage imageNamed:@"ic_gender_male"]];
}else if (self.model.sex == 1){
[cell.sexImageView setImage:[UIImage imageNamed:@"ic_gender_female"]];
}
return cell;
}else{
static NSString *ID = @"IMInfoTableViewCell";
IMInfoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
if (cell == nil) {
cell = [[NSBundle mainBundle]loadNibNamed:@"IMInfoTableViewCell" owner:self options:nil].lastObject;
}
if (indexPath.row == 0) {
cell.title.text = @"头像";
[cell.headImage sd_setImageWithURL:[NSURL URLWithString:self.model.headUrl] placeholderImage:[UIImage imageNamed:@"logo"]];
cell.switchView.hidden = YES;
}else if (indexPath.row == 1){
cell.title.text = @"昵称";
cell.label.text = self.model.nickname;
cell.switchView.hidden = YES;
}else if (indexPath.row == 2){
cell.title.text = @"备注";
cell.label.text = self.model.remark;
cell.switchView.hidden = YES;
}else if (indexPath.row == 3){
cell.title.text = @"性别";
NSString *gender;
if (self.model.sex == 0) {
gender = @"男";
}else if (self.model.sex == 1){
gender = @"女";
}
cell.label.text = gender;
cell.switchView.hidden = YES;
}else if (indexPath.row == 4){
cell.title.text = @"生日";
cell.label.text = self.model.birthday;
cell.switchView.hidden = YES;
}else if (indexPath.row == 5){
cell.title.text = @"个性签名";
cell.label.text = self.model.signature;
cell.switchView.hidden = YES;
}
return cell;
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 12;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *view = [UIView new];
view.backgroundColor = RGB(244, 244, 244);
return view;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0.01;
}
@end
】