You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
// |
|
// XHAlbumPhotoCollectionViewCell.m |
|
// MessageDisplayExample |
|
// |
|
// Created by 曾 宪华 on 14-5-20. |
|
// Copyright (c) 2014年 曾宪华 开发团队(http://iyilunba.com ) 本人QQ:543413507 本人QQ群(142557668). All rights reserved. |
|
// |
|
|
|
#import "XHAlbumPhotoCollectionViewCell.h" |
|
#import "UIImageView+WebCache.h" |
|
|
|
@implementation XHAlbumPhotoCollectionViewCell |
|
|
|
#pragma mark - Propertys |
|
|
|
- (UIImageView *)photoImageView { |
|
if (!_photoImageView) { |
|
_photoImageView = [[UIImageView alloc] initWithFrame:self.bounds]; |
|
_photoImageView.contentMode = UIViewContentModeScaleAspectFill; |
|
_photoImageView.clipsToBounds = YES; |
|
} |
|
return _photoImageView; |
|
} |
|
|
|
- (void)setImageUrl:(NSString *)imageUrl{ |
|
_imageUrl = imageUrl; |
|
_photoImageView.backgroundColor = [UIColor redColor]; |
|
[_photoImageView sd_setImageWithURL:[NSURL URLWithString:_imageUrl] |
|
placeholderImage:[UIImage imageNamed:@"加载默认图"] |
|
options:SDWebImageRetryFailed]; |
|
} |
|
|
|
#pragma mark - Life Cycle |
|
|
|
- (id)initWithFrame:(CGRect)frame { |
|
self = [super initWithFrame:frame]; |
|
if (self) { |
|
// Initialization code |
|
[self.contentView addSubview:self.photoImageView]; |
|
} |
|
return self; |
|
} |
|
|
|
@end
|
|
|