64 lines
2.0 KiB
Objective-C
64 lines
2.0 KiB
Objective-C
//
|
|
// ShopDetailViewfirstCell.m
|
|
// Ifish
|
|
//
|
|
// Created by imac on 17/1/17.
|
|
// Copyright © 2017年 lianlian. All rights reserved.
|
|
//
|
|
|
|
#import "ShopDetailViewfirstCell.h"
|
|
#import "UIImageView+WebCache.h"
|
|
@implementation ShopDetailViewfirstCell
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
// Initialization code
|
|
[self setItemsCorner];
|
|
}
|
|
//frame reset
|
|
-(void)setItemsCorner
|
|
{
|
|
|
|
CGFloat W = self.shopImg.frame.size.height;
|
|
self.shopImg.layer.masksToBounds = YES;
|
|
self.shopImg.layer.cornerRadius = W/2;
|
|
self.shopImg.layer.borderWidth = 3;
|
|
self.shopImg.layer.borderColor = RGB(162,210, 255).CGColor;
|
|
self.province.layer.masksToBounds = YES;
|
|
self.province.layer.cornerRadius = self.province.frame.size.height/2;
|
|
self.vRenZheng.layer.masksToBounds = YES;
|
|
self.vRenZheng.layer.cornerRadius = self.vRenZheng.frame.size.height/2;
|
|
self.nYear.layer.masksToBounds = YES;
|
|
self.nYear.layer.cornerRadius = self.nYear.frame.size.height/2;
|
|
|
|
}
|
|
|
|
-(void)loadDataWith:(IfishShopInfo *)info
|
|
{
|
|
NSString*str=[NSString stringWithFormat:@"%@%@",kGetIconUrl,info.userImg];
|
|
[self.shopImg sd_setImageWithURL:[NSURL URLWithString:str]];
|
|
self.nYear.text = info.remark;
|
|
|
|
NSString *str2= @"已认证";
|
|
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str2];
|
|
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.vRenZheng.attributedText = attri;
|
|
self.province.text = info.shopsProvince;
|
|
self.shopUser.text = info.userName;
|
|
self.ShopName.text = info.shopsName;
|
|
|
|
}
|
|
|
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
|
[super setSelected:selected animated:animated];
|
|
|
|
// Configure the view for the selected state
|
|
}
|
|
|
|
@end
|