DailyReconciliationCell.m 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // DailyReconciliationCell.m
  3. // IBOSSmini
  4. //
  5. // Created by apple on 2017/5/16.
  6. // Copyright © 2017年 elongtian. All rights reserved.
  7. //
  8. #import "DailyReconciliationCell.h"
  9. #import "UIColor+hexColor.h"
  10. @implementation DailyReconciliationCell
  11. /**
  12. 高度
  13. @return <#return value description#>
  14. */
  15. - (int)height{
  16. return 40;
  17. }
  18. /**
  19. 后台代码创建单元cell
  20. @param style <#style description#>
  21. @param reuseIdentifier <#reuseIdentifier description#>
  22. @return <#return value description#>
  23. */
  24. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  25. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  26. [self initUI];
  27. return self;
  28. }
  29. /**
  30. ui
  31. */
  32. - (void)initUI{
  33. UIView *viewCell = [UIView new];
  34. viewCell.frame = CGRectMake(0, 0, Screen_Width, self.height);
  35. viewCell.backgroundColor = [UIColor whiteColor];
  36. [self.contentView addSubview:viewCell];
  37. CGFloat backY = 8;
  38. CGFloat lblx = 20;
  39. CGFloat lblwidth = 130;
  40. CGFloat fontsize = 13;
  41. CGFloat valueheight = 25;
  42. _lblTotalReceiptView = [UILabel new];
  43. _lblTotalReceiptView.frame=CGRectMake(Screen_Width - 2*lblwidth - 10 - 2, backY, lblwidth, valueheight);
  44. _lblTotalReceiptView.font = [UIFont systemFontOfSize:fontsize];
  45. //_totalReceiptView=@"收款总额";
  46. _lblTotalReceiptView.textAlignment = NSTextAlignmentRight;
  47. [viewCell addSubview:_lblTotalReceiptView];
  48. _lblTotalReceivableView = [UILabel new];
  49. _lblTotalReceivableView.frame=CGRectMake(Screen_Width - lblwidth - 10, backY, lblwidth, valueheight);
  50. _lblTotalReceivableView.font = [UIFont systemFontOfSize:fontsize];
  51. //_totalReceivableView.text=@"货款总额";
  52. _lblTotalReceivableView.textAlignment = NSTextAlignmentRight;
  53. [viewCell addSubview:_lblTotalReceivableView];
  54. _lblOrgNameView = [UILabel new];
  55. _lblOrgNameView.frame=CGRectMake(lblx, backY, Screen_Width - CGRectGetMinX(_lblTotalReceiptView.frame) - lblx, valueheight);
  56. _lblOrgNameView.font = [UIFont systemFontOfSize:fontsize];
  57. //_orgNameView.text=@"部门";
  58. [viewCell addSubview:_lblOrgNameView];
  59. UIView *viewBackgroud = [UIView new];
  60. viewBackgroud.frame = CGRectMake(0, CGRectGetMaxY(viewCell.frame)-1, Screen_Width, 1);
  61. viewBackgroud.backgroundColor = LineBackgroundColor;
  62. [viewCell addSubview:viewBackgroud];
  63. }
  64. @end