| 1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // CGPTCollectionViewCell.m
- // jitao
- //
- // Created by 罗云飞 on 2018/1/20.
- // Copyright © 2018年 罗云飞. All rights reserved.
- //
- #import "CGPTCollectionViewCell.h"
- @implementation CGPTCollectionViewCell
- - (id)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- _incoImage = [UIImageView new];
- _incoImage.backgroundColor = NewClearColor;
- [self.contentView addSubview:_incoImage];
-
- _incoImage.sd_layout
- .leftSpaceToView(self.contentView, 0)
- .rightSpaceToView(self.contentView, 10)
- .topSpaceToView(self.contentView, 10)
- .bottomSpaceToView(self.contentView, 5);
-
- _deleteButton = [UIButton new];
- [_deleteButton setImage:NewImageNamed(@"删除照片") forState:UIControlStateNormal];
- _deleteButton.frame = CGRectMake(self.bounds.size.width-20, 2, 20, 20);
- [self.contentView addSubview:_deleteButton];
-
- }
- return self;
- }
- -(void)SetCollCellData:(NSString *)indexpath {
- [_incoImage sd_setImageWithURL:NewURL([indexpath mosaicUrlPrefix]) placeholderImage:NewImageNamed(@"banner")];
- }
- @end
|