把backImage,和网络图片profileImageUrl,以及描述文字username 合并成一张图片
-(UIImage*)combineImagesBy:(UIImage *)backImage profileImageUrl:(NSString *)profileImageUrl username:(NSString *)username
{
NSLog(@"%@%@%@",backImage,profileImageUrl,username);
UIView *ShareView=[[UIViewalloc] initWithFrame:CGRectMake(0,0, 440, 976)];
UIImageView *ShareViewBG=[[UIImageViewalloc] initWithImage:backImage];
[ShareView addSubview:ShareViewBG];
UIImageView *HeadView=[[UIImageViewalloc] initWithFrame:CGRectMake(30,430, 70, 70)];
HeadView.image=[UIImageimageWithData:[NSDatadataWithContentsOfURL:[NSURLURLWithString:profileImageUrl]]];
[ShareView addSubview:HeadView];
UILabel *usernameLabel=[[UILabelalloc] initWithFrame:CGRectMake(110,480, 100, 20)];
usernameLabel.text=username;
usernameLabel.font=[UIFontsystemFontOfSize:22.0];
usernameLabel.backgroundColor=[UIColorclearColor];
[ShareView addSubview:usernameLabel];
UIGraphicsBeginImageContext(ShareView.bounds.size);
[ShareView.layerrenderInContext:UIGraphicsGetCurrentContext()];
UIImage*image =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}