LVCHeaderRollCollectionViewCell.m 1.09 KB
//
//  LVCHeaderRollCollectionViewCell.m
//  LiveVideoCloud
//
//  Created by iOS on 17/3/27.
//  Copyright © 2017年 cnlive. All rights reserved.
//

#import "LVCHeaderRollCollectionViewCell.h"

@interface LVCHeaderRollCollectionViewCell ()

@property (nonatomic, strong) UIImageView *imageView;

@end

@implementation LVCHeaderRollCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self.contentView addSubview:self.imageView];
        
    }
    return self;
}

#pragma mark -
#pragma mark - setter
- (void)setImageUrl:(NSURL *)imageUrl {
    _imageUrl = imageUrl;
    [_imageView sd_setImageWithURL:imageUrl placeholderImage:[UIImage imageNamed:@"load_03"]];
}

#pragma mark -
#pragma mark - gstter
- (UIImageView *)imageView
{
    if (!_imageView) {
        _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-20, (SCREEN_WIDTH-20)/2)];
        _imageView.backgroundColor = [UIColor whiteColor];
        _imageView.contentMode = UIViewContentModeScaleToFill;
    }
    return _imageView;
}

@end