ifish/Ifish/controllers/IfishTabControllers/探索/lookafterServer/KanHuFuWuXInRuKou/IFishShopsViewCell.m

56 lines
1.8 KiB
Objective-C

//
// IFishShopsViewCell.m
// CollectionViewTest
//
// Created by imac on 17/1/16.
// Copyright © 2017年 xiang. All rights reserved.
//
#import "IFishShopsViewCell.h"
#import "UIImageView+WebCache.h"
@implementation IFishShopsViewCell
- (void)awakeFromNib {
[super awakeFromNib];
}
-(void)loadDataWtih:(IfishShopInfo *)shopInfo
{
self.shopLoaction.text = [NSString stringWithFormat:@"%@%@",shopInfo.shopsProvince,shopInfo.shopsCity];
self.shopYear.text = shopInfo.remark;
self.shopName.text = shopInfo.shopsName;
NSString*str=[NSString stringWithFormat:@"%@%@",kGetIconUrl,shopInfo.userImg];
[self.shopImg sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:[UIImage imageNamed:@""]];
}
-(void)subviewsCorner
{
NSString *str= @"已认证";
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str];
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
attch.image = [UIImage imageNamed:@"businesslistings_v"];
attch.bounds = CGRectMake(0,0,9,8);
NSAttributedString *attristr=[NSAttributedString attributedStringWithAttachment:attch];
[attri insertAttributedString:attristr atIndex:0];
self.v_label.attributedText = attri;
self.v_label.layer.masksToBounds = YES;
self.v_label.layer.cornerRadius = self.v_label.bounds.size.height/2;
//self.shopLoaction.layer.masksToBounds = YES;
//self.shopLoaction.layer.cornerRadius = self.shopLoaction.bounds.size.height/2;
//self.shopYear.layer.masksToBounds = YES;
//self.shopYear.layer.cornerRadius = self.shopYear.bounds.size.height/2;
self.shopImg.layer.masksToBounds = YES;
self.shopImg.layer.cornerRadius = self.shopImg.bounds.size.height/2;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
}
@end