RQExamResultHeaderView.m 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // RQExamResultHeaderView.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/7/26.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import "RQExamResultHeaderView.h"
  9. #import "QMUIPieProgressView.h"
  10. @interface RQExamResultHeaderView ()
  11. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topTopSuperView;
  12. @property (weak, nonatomic) IBOutlet UIView *bottomView;
  13. @property (weak, nonatomic) IBOutlet QMUIButton *errorBtn;
  14. @property (weak, nonatomic) IBOutlet QMUIButton *reExamBtn;
  15. @property (weak, nonatomic) IBOutlet QMUIButton *getMiJiBtn;
  16. @end
  17. @implementation RQExamResultHeaderView
  18. + (instancetype)examResultHeaderView {
  19. return [super rq_viewFromXib];
  20. }
  21. - (void)awakeFromNib {
  22. [super awakeFromNib];
  23. _topTopSuperView.constant = RQ_APPLICATION_STATUS_BAR_HEIGHT + RQ_APPLICATION_NAV_BAR_HEIGHT + 16.f;
  24. _bottomView.layer.shadowColor = RGBA_COLOR(124, 129, 136, 0.2).CGColor;
  25. [_backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
  26. [_reportCardBtn addTarget:self action:@selector(reportCardBtnAction) forControlEvents:UIControlEventTouchUpInside];
  27. _errorBtn.imagePosition = QMUIButtonImagePositionRight;
  28. _reExamBtn.imagePosition = QMUIButtonImagePositionRight;
  29. _myProgressView.shape = QMUIPieProgressViewShapeRing;
  30. _myProgressView.size = CGSizeMake(RQ_FIT_HORIZONTAL(148.f), RQ_FIT_HORIZONTAL(148.f));
  31. _myProgressView.layer.shadowColor = RGBA_COLOR(193, 16, 16, 0.2).CGColor;
  32. _getMiJiBtn.layer.cornerRadius = RQ_FIT_HORIZONTAL(24.f) / 2.f;
  33. [_fastUpBtn setBackgroundImage:[UIImage imageWithGradualChangingColor:^(QQGradualChangingColor *graColor) {
  34. graColor.fromColor = RQColorFromHexString(@"#FF4C52");
  35. graColor.toColor = RQColorFromHexString(@"#FC8269");
  36. graColor.type = QQGradualChangeTypeLeftToRight;
  37. } size:CGSizeMake(RQ_FIT_HORIZONTAL(76.f), RQ_FIT_HORIZONTAL(30.f)) cornerRadius:QQRadiusMakeSame(RQ_FIT_HORIZONTAL(30.f) / 2.f)] forState:UIControlStateNormal];
  38. // RGBA_COLOR(239, 145, 167, 0.2).CGColor
  39. }
  40. - (void)backBtnAction {
  41. [RQ_APPDELEGATE.services popToRootViewModelAnimated:YES];
  42. }
  43. - (void)reportCardBtnAction {
  44. }
  45. - (IBAction)upAction:(id)sender {
  46. [RQ_VIP_Module gotoBuyVipWithVipPageType:RQVIPPageType_Full];
  47. }
  48. @end