//
|
// Starview.m
|
// BuWanVideo2.0
|
//
|
// Created by weikou2016 on 16/8/18.
|
// Copyright © 2016年 com.yeshi.buwansheque.ios. All rights reserved.
|
//
|
|
#import "Starview.h"
|
|
@implementation Starview
|
|
+ (instancetype)initwithFrame:(CGRect)frame WithDic:(NSDictionary*)dic{
|
|
NSArray* arrayView = [[NSBundle mainBundle] loadNibNamed:@"Starview" owner:self options:nil];
|
Starview *SV = [arrayView objectAtIndex:0];
|
SV.frame = frame;
|
SV.backgroundColor = [UIColor whiteColor];
|
|
SV.image.layer.masksToBounds=YES;
|
SV.image.layer.cornerRadius=40.0;
|
|
//加载数据
|
[SV.image setContentMode:UIViewContentModeScaleAspectFill];
|
[SV.image setYthImageWithURL:[dic objectForKey:@"Portrait"] placeholderImage:[UIImage imageNamed:@"关注默认头像"]];
|
SV.name.text = [dic objectForKey:@"Name"];
|
SV.work.text = [NSString stringWithFormat:@"职业:%@",[dic objectForKey:@"Job"]];
|
SV.Nationality.text = [NSString stringWithFormat:@"国籍:%@",[dic objectForKey:@"Country"]];
|
SV.Production.text = [NSString stringWithFormat:@"代表作:%@",[dic objectForKey:@"Works"]];
|
|
return SV;
|
}
|
|
|
|
@end
|