SPSBPurchasersDetailsImageDemandViewController.m 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. //
  2. // SPSBPurchasersDetailsImageDemandViewController.m
  3. // 我的社保
  4. //
  5. // Created by shanp on 2021/5/18.
  6. //
  7. #import "SPSBPurchasersDetailsImageDemandViewController.h"
  8. #import "SPSBUIGeneralHeader.h"
  9. @interface SPSBPurchasersDetailsImageDemandViewController () {
  10. UIView *_contentView;
  11. }
  12. @end
  13. @implementation SPSBPurchasersDetailsImageDemandViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. [self setupUI];
  17. }
  18. #pragma mark - Action
  19. - (void)closeAction {
  20. [_contentView makeConstraints:^(JXHConstraintMaker *make) {
  21. make.top.update(0);
  22. }];
  23. [UIView animateWithDuration:0.3 animations:^{
  24. self.view.backgroundColor = spsb_000000_color(0.f);
  25. [self.view layoutSubviews];
  26. } completion:^(BOOL finished) {
  27. [self dismissViewControllerAnimated:false completion:nil];
  28. }];
  29. }
  30. #pragma mark - Network Action
  31. #pragma mark - Overwrite
  32. - (void)showAnimation {
  33. [_contentView makeConstraints:^(JXHConstraintMaker *make) {
  34. make.top.update(-jxh_viewHeight(self->_contentView));
  35. }];
  36. [UIView animateWithDuration:0.3 animations:^{
  37. self.view.backgroundColor = spsb_000000_color(SPSBPopupViewBackgroundAlpha);
  38. [self.view layoutSubviews];
  39. }];
  40. }
  41. - (void)setupAnimation {
  42. self.view.backgroundColor = spsb_000000_color(0.f);
  43. }
  44. #pragma mark - UI
  45. - (void)setupUI {
  46. _contentView = UIView.new;
  47. _contentView.backgroundColor = spsb_FFFFFF_color(1.f);
  48. [self.view addSubview:_contentView];
  49. [_contentView makeConstraints:^(JXHConstraintMaker *make) {
  50. make.leading.and.trailing.equalTo(0);
  51. make.height.equalTo(480);
  52. make.top.equalTo(self.view.bottom);
  53. }];
  54. //header
  55. UIView *headerView = spsb_createShotViewHeaderWithTitle(@"身份证照片要求", @selector(closeAction), self);
  56. [_contentView addSubview:headerView];
  57. [headerView makeConstraints:^(JXHConstraintMaker *make) {
  58. make.top.and.leading.and.trailing.equalTo(0);
  59. }];
  60. //
  61. UILabel *title = [UILabel convenienceWithFont:spsb_semiboldFont(15) text:@"拍摄实例如下:" textColor:spsb_333333_color()];
  62. [_contentView addSubview:title];
  63. [title makeConstraints:^(JXHConstraintMaker *make) {
  64. make.top.equalTo(headerView.bottom).offset(23);
  65. make.leading.equalTo(25);
  66. }];
  67. UIImageView *imageView = [[UIImageView alloc] initWithImage:jxh_getImage(photo_tips)];
  68. [_contentView addSubview:imageView];
  69. [imageView makeConstraints:^(JXHConstraintMaker *make) {
  70. make.top.equalTo(title.bottom).offset(20);
  71. make.leading.equalTo(25);
  72. make.trailing.equalTo(-25);
  73. make.height.equalTo((jxh_screenWidth() - 50) * 0.31);
  74. }];
  75. UILabel *tipsLabel = [UILabel convenienceWithFont:spsb_font(14) textColor:spsb_666666_color() limitWidth:jxh_screenWidth() - 50];
  76. [tipsLabel setAttributedStringWithText:@"1. 请上传清晰彩色,完整的原件扫描件或照片\n2. 拍摄确保身份证边框完整、字体清晰、亮度均匀\n3. 身份证各项信息及头像清晰可见,容易识别\n4. 证件必须真实拍摄,不能使用复印件" lineSpacing:12];
  77. [_contentView addSubview:tipsLabel];
  78. [tipsLabel makeConstraints:^(JXHConstraintMaker *make) {
  79. make.top.equalTo(imageView.bottom).offset(30);
  80. make.leading.equalTo(25);
  81. make.trailing.equalTo(-25);
  82. }];
  83. UIButton *button = [UIButton convenienceWithTarget:self action:@selector(closeAction)];
  84. [self.view addSubview:button];
  85. [button makeConstraints:^(JXHConstraintMaker *make) {
  86. make.leading.and.trailing.and.top.equalTo(0);
  87. make.bottom.equalTo(self->_contentView.top);
  88. }];
  89. }
  90. @end