TrainPhotoCell.m 965 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // TrainPhotoCell.m
  3. // LNManager
  4. //
  5. // Created by apple on 2017/6/26.
  6. // Copyright © 2017年 lee. All rights reserved.
  7. //
  8. #import "TrainPhotoCell.h"
  9. @implementation TrainPhotoCell
  10. -(instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self) {
  14. self.backgroundColor = [UIColor whiteColor];
  15. _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, frame.size.width - 20, frame.size.width - 20)];
  16. _imageView.clipsToBounds = YES;
  17. _imageView.contentMode = UIViewContentModeScaleAspectFit;
  18. [self.contentView addSubview:_imageView];
  19. _dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, frame.size.width + 20, frame.size.width - 20, 20)];
  20. [_dateLabel setText:@"" Font:FontTitle TextColor:[UIColor blackColor] Alignment:NSTextAlignmentCenter];
  21. [self.contentView addSubview:_dateLabel];
  22. }
  23. return self;
  24. }
  25. @end