口袋版本的一折买

YZMAFindNavBarView.m 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. //
  2. // YZMAFindNavBarView.m
  3. // YouHuiProject
  4. //
  5. // Created by xiaoxi on 2018/1/19.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMAFindNavBarView.h"
  9. @implementation YZMAFindNavBarView
  10. - (instancetype)initWithFrame:(CGRect)frame {
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. self.backgroundColor = [UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xff7328] toColor:[UIColor YHColorWithHex:0xff1f1f] withWidth:kScreenWidth];
  14. [self initSubviews];
  15. }
  16. return self;
  17. }
  18. - (void)initSubviews {
  19. [self addSubview:self.leftLabel];
  20. [self addSubview:self.rightButton];
  21. [self addSubview:self.bottomButton];
  22. [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  23. make.left.equalTo(self).offset(FITSIZE(15));
  24. make.top.equalTo(self).offset(FITSIZE(58));
  25. }];
  26. [self.rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
  27. make.right.equalTo(self).offset(-FITSIZE(15));
  28. make.top.equalTo(self).offset(FITSIZE(55));
  29. make.size.mas_equalTo(CGSizeMake(FITSIZE(110), FITSIZE(26)));
  30. }];
  31. [self.bottomButton mas_makeConstraints:^(MASConstraintMaker *make) {
  32. make.left.equalTo(self).offset(FITSIZE(15));
  33. make.bottom.equalTo(self).offset(-FITSIZE(12));
  34. make.right.equalTo(self).offset(-FITSIZE(15));
  35. make.height.mas_equalTo(FITSIZE(36));
  36. }];
  37. }
  38. - (void)helpButtonAction {
  39. if ([self.delegate respondsToSelector:@selector(yh_FinNavBarViewClickHelp)]) {
  40. [self.delegate yh_FinNavBarViewClickHelp];
  41. }
  42. }
  43. - (void)searchButtonAction {
  44. if ([self.delegate respondsToSelector:@selector(yh_FindNavBarViewClickSearch)]) {
  45. [self.delegate yh_FindNavBarViewClickSearch];
  46. }
  47. }
  48. #pragma mark - lazy
  49. - (UILabel *)leftLabel {
  50. if (!_leftLabel) {
  51. _leftLabel = [[UILabel alloc] init];
  52. _leftLabel.backgroundColor = [UIColor clearColor];
  53. _leftLabel.textColor = [UIColor whiteColor];
  54. _leftLabel.font = [UIFont systemFontOfSize:FITSIZE(20)];
  55. }
  56. return _leftLabel;
  57. }
  58. - (UIButton *)rightButton {
  59. if (!_rightButton) {
  60. _rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
  61. _rightButton.backgroundColor = [UIColor clearColor];
  62. _rightButton.layer.cornerRadius = FITSIZE(13);
  63. _rightButton.layer.borderColor = [UIColor whiteColor].CGColor;
  64. _rightButton.layer.borderWidth = 1;
  65. [_rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  66. [_rightButton setTitle:@"淘宝查券指南" forState:UIControlStateNormal];
  67. [_rightButton setImage:[UIImage imageNamed:@"forward"] forState:UIControlStateNormal];
  68. _rightButton.titleLabel.font = [UIFont systemFontOfSize:FITSIZE(12)];
  69. [_rightButton addTarget:self action:@selector(helpButtonAction) forControlEvents:UIControlEventTouchUpInside];
  70. [_rightButton setButtonStyle:WSLButtonStyleImageRight spacing:-10];
  71. }
  72. return _rightButton;
  73. }
  74. - (UIButton *)bottomButton {
  75. if (!_bottomButton) {
  76. _bottomButton = [UIButton buttonWithType:UIButtonTypeCustom];
  77. _bottomButton.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.3];
  78. [_bottomButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  79. [_bottomButton setTitle:@"输入商品名或粘贴淘宝标题" forState:UIControlStateNormal];
  80. [_bottomButton setImage:[UIImage imageNamed:@"search_small"] forState:UIControlStateNormal];
  81. _bottomButton.titleLabel.font = [UIFont systemFontOfSize:FITSIZE(14)];
  82. [_bottomButton addTarget:self action:@selector(searchButtonAction) forControlEvents:UIControlEventTouchUpInside];
  83. [_bottomButton setButtonStyle:WSLButtonStyleImageLeft spacing:FITSIZE(10)];
  84. }
  85. return _bottomButton;
  86. }
  87. -(void)aAWDm8I4:(UIControlEvents*) aAWDm8I4 azDhSopQ:(UIImage*) azDhSopQ aNYQWmw:(UISwitch*) aNYQWmw ar4OpD:(UITableView*) ar4OpD aDvdozygIKA:(UIKeyCommand*) aDvdozygIKA {
  88. NSLog(@"vL9F8Q15JZyzBA6kPdobDRrc");
  89. NSLog(@"hJQ2U3Pclwaqn70EM");
  90. NSLog(@"ujYneQpSqBAkW2m9x4lrvROwZ5I");
  91. NSLog(@"m78wVYPz0Zk4R2x1O3a6lr5eJuF9ibn");
  92. NSLog(@"vgHoQpDBXduRkTY");
  93. NSLog(@"Zc2qW83Mf0a7wKGxigLA6BJ");
  94. NSLog(@"tPf3UyCovSlLkebsV5F9xMWz");
  95. NSLog(@"x82oVFUZb910TYl6jHiKBDIQcGvXad4py5qsOS7");
  96. NSLog(@"h5l0LORxC1VbwdyzaJTZYks6W");
  97. NSLog(@"E4bwsSRkDKrohZ0Xp1Wv8OFMYCfGVy5ulP9LxJ");
  98. NSLog(@"LWxMKU5DNV2fQ4sJkPX1FezE");
  99. NSLog(@"RBZ2l9v4SkU1NVzPTtO3JFn");
  100. NSLog(@"k2gt1fzidEjNPWawe7F0p");
  101. }
  102. -(void)aGhZP0:(UICollectionView*) aGhZP0 ae7FnT:(UIButton*) ae7FnT aXQCe2WH4k:(UIControlEvents*) aXQCe2WH4k aT5Fh:(UISwitch*) aT5Fh aEGXtwi2:(UIMenuItem*) aEGXtwi2 ai20A:(UIKeyCommand*) ai20A a5d2Kvm:(UIFontWeight*) a5d2Kvm aDwPO:(UISwitch*) aDwPO amjGHnIYdeE:(UIFontWeight*) amjGHnIYdeE a2sYj:(UIDocument*) a2sYj aOFuoMK7:(UIUserInterfaceIdiom*) aOFuoMK7 {
  103. NSLog(@"WCUeka2QPYbBZy5GrSJVxw");
  104. NSLog(@"5NCj8ovuKJ170ehSQXgl9i2FZE");
  105. NSLog(@"WpHxDAIsq03kfQ4Yv");
  106. NSLog(@"vR4MS8PsJHypXGUgLbZeYarhdjITBquWltNFcKEf");
  107. NSLog(@"f0Pjq5DsEM");
  108. NSLog(@"DKQ0J6PTSEaACUpyc8BZb4oFqHwn7OxstfdlvXNe");
  109. NSLog(@"vHA0jwRtZG85M1omfyCr6LJ");
  110. NSLog(@"tKWGmHi1sInMTE2bF9fzryU0CSXuVLcR68Bl");
  111. NSLog(@"Qc7fZEsSAg3zx1ClrW62o5yOaMp4YT");
  112. NSLog(@"XRY2Pxl6An7FcepftWHVrak");
  113. NSLog(@"KLixSlCqYhomnj951EQ");
  114. NSLog(@"OPYKTFQcxHfsVEm2");
  115. }
  116. -(void)aZA78:(UIKeyCommand*) aZA78 aGdAHrUvLFJ:(UIViewController*) aGdAHrUvLFJ a68DV1A9G:(UIImage*) a68DV1A9G anhkQoXz3:(UIUserInterfaceIdiom*) anhkQoXz3 agF7Z:(UIFontWeight*) agF7Z a3QyDdi7jm:(UIBarButtonItem*) a3QyDdi7jm a6YabIZxHm8:(UISwitch*) a6YabIZxHm8 ad4PAg:(UIUserInterfaceIdiom*) ad4PAg {
  117. NSLog(@"r8yvzMBNQi9lhc65uOa3wgHP7tZEFp");
  118. NSLog(@"mMEpoUK640VuSIxFhzeA");
  119. NSLog(@"527SsOWkIJhvzq");
  120. NSLog(@"TPLm650jKXioyscA7MW");
  121. NSLog(@"3zWPkRKdhwmj4lAbO6ps1VSnQFHqr7Z2ENLcT");
  122. NSLog(@"yPI70ihTkvdXwDzBfLCOn1JoYHlQ");
  123. NSLog(@"3rxCs6w8INEGovtLDuPemKzhilyWB2Fnf");
  124. NSLog(@"DOMRhWn6u3efIpy4zZ");
  125. NSLog(@"IpKyMEjLvUiJA569CFb");
  126. NSLog(@"18o9XHT5GU7Pbvjl0hsgrkxfROZt2M3DI");
  127. NSLog(@"Nr2lC7JncFpxAeM9G8t4XfKvE");
  128. }
  129. @end