| 12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // FooterCollectionReusableView.m
- // DKAssetsPickerDemo
- //
- //
- #import "DKPhotoPickerFooterCollectionReusableView.h"
- #import "UIView+Extension.h"
- @interface DKPhotoPickerFooterCollectionReusableView ()
- @property (weak, nonatomic) UILabel *footerLabel;
- @end
- @implementation DKPhotoPickerFooterCollectionReusableView
- - (UILabel *)footerLabel{
- if (!_footerLabel) {
- UILabel *footerLabel = [[UILabel alloc] init];
- footerLabel.frame = self.bounds;
- footerLabel.textAlignment = NSTextAlignmentCenter;
- [self addSubview:footerLabel];
- self.footerLabel = footerLabel;
- }
-
- return _footerLabel;
- }
- - (void)setCount:(NSInteger)count{
- _count = count;
-
- if (count > 0) {
- self.footerLabel.text = [NSString stringWithFormat:@"有 %ld 张图片", (long)count];
- }
- }
- @end
|