// // SPSBQueryListDetailsViewController.m // 我的社保 // // Created by shanp on 2021/5/28. // #import "SPSBQueryListDetailsViewController.h" #import "SPSBUIGeneralHeader.h" #import "SPSBPurchasersModel.h" #import "SPSBQueryListModel.h" #import #import "SPSBCustomerServiceManager.h" #import "SPSBMakePhoneCallManager.h" #import "SPSBConfirmAlertViewController.h" #import "SPSBPickerViewController.h" #import "SPSBPickerView.h" #import "SPSBQueryListDetailsTransactionViewViewController.h" #import "SPSBRefundViewController.h" #import "SPSBPurchaseSBDetailsViewController.h" #import "SPSBPurchaseGJJDetailsViewController.h" #import "SPSBMyPurchaseOrder.h" #import "SPSBBusinessManager.h" #define spsb_queryListDetailsViewBottomButtonTag 3000 #define spsb_queryListDetailsViewCityLabelTag 3000 @interface SPSBQueryListDetailsViewController () { NSDictionary *_statusDic; SPSBQueryListModel *_showData; NSArray *_cityArray; UIScrollView *_bgScrollView; UIView *_statusView; UIView *_bottomView; UIButton *_refundButton; UIView *_firstView; UIView *_detailsView; SPSBMakePhoneCallManager *_makePhoneCallManager; } @end @implementation SPSBQueryListDetailsViewController - (void)viewDidLoad { [super viewDidLoad]; [self initData]; [self setupUI]; } - (void)initData { _showData = _spsb_data[0]; _statusDic = [self getOredrStatusData]; [self createCityArray]; _makePhoneCallManager = [[SPSBMakePhoneCallManager alloc] initWithController:self]; } - (NSDictionary *)getOredrStatusData { return @{@"2" : @[@"付款成功", @"待专员跟进", @"1"], @"3" : @[_spsb_businessType == SPSBSocialInsurancePurchase ? @"地税局申报中" : @"公积金中心申报中", @"若有异常会短信/电话通知", @"1"], @"4" : @[_spsb_businessType == SPSBSocialInsurancePurchase ? @"参保成功" : @"缴存成功", @"次月中可通过官方途径查询", @"1"], @"5" : @[_spsb_businessType == SPSBSocialInsurancePurchase ? @"参保失败" : @"缴存失败", @"待专员退款,请耐心等候", @"0"], @"11" : @[@"退款成功", @"待专员跟进", @"0"], @"15" : @[@"退款中", @"待专员处理,请耐心等候", @"0"]}; } - (void)createCityArray { if (_spsb_data.count == 1) return; NSMutableArray *arr = [@[] mutableCopy]; for (NSInteger i = 0; i < _spsb_data.count; i ++) { SPSBQueryListModel *mode = _spsb_data[i]; [arr addObject:mode.spsb_city]; } _cityArray = arr; } #pragma mark - Action - (void)bottomButtonAction:(UIButton *)sender { if (sender.tag == spsb_queryListDetailsViewBottomButtonTag) { [spsb_customerServiceManager() toOnlineContactWithBaseController:self]; } else if (sender.tag == spsb_queryListDetailsViewBottomButtonTag + 1) { [_makePhoneCallManager showHandleContactMenu]; } } - (void)detailsButtonAction { SPSBQueryListDetailsTransactionViewViewController *vc = SPSBQueryListDetailsTransactionViewViewController.new; vc.spsb_orderNo = _showData.spsb_order_no; [self.navigationController pushViewController:vc animated:true]; } - (void)changeCityAction { if (!_cityArray) return; SPSBPickerViewController *vc = SPSBPickerViewController.new; vc.spsb_dataArray = @[_cityArray]; @weakify(self) vc.spsb_finishChose = ^(SPSBPickerView * _Nonnull pickerView) { @strongify(self) [self completeToChoseCityWithPickerView:pickerView]; }; vc.spsb_willDisplay = ^(SPSBPickerView * _Nonnull pickerView) { [pickerView chooseRow:0 inComponent:0 animated:false]; }; [self presentViewController:vc animated:false completion:nil]; } - (void)completeToChoseCityWithPickerView:(SPSBPickerView *)pickerView { NSInteger index = [pickerView.spsb_choseArray[0] integerValue]; _showData = _spsb_data[index]; ((UILabel *)[_firstView viewWithTag:spsb_queryListDetailsViewCityLabelTag]).text = _showData.spsb_city; [self createStatusView]; [self createDetailsView]; [self judgeBottomView]; } - (void)goToPurchase { spsb_setMyPurchaseOrder(SPSBMyPurchaseOrder.new); spsb_myPurchaseOrder().spsb_isSupplementaryPay = false; if (_spsb_businessType == SPSBSocialInsurancePurchase) { [self.navigationController pushViewController:SPSBPurchaseSBDetailsViewController.new animated:true]; } else { [self.navigationController pushViewController:SPSBPurchaseGJJDetailsViewController.new animated:true]; } } - (void)refundAction { if ([_showData.spsb_pay_status integerValue] == 2) { SPSBConfirmAlertViewController *vc = [SPSBConfirmAlertViewController alertWithTitle:@"退款申请" content:[NSString stringWithFormat:@"你确定要退%@的%@(需于截止时间前7天申请)", _showData.spsb_for_month, _spsb_businessType == SPSBSocialInsurancePurchase ? @"社保" : @"公积金"]]; [vc setCancelButtonTitle:nil titleColor:nil action:^{ }]; @weakify(self) [vc setConfirmButtonTitle:nil titleColor:nil action:^{ @strongify(self) SPSBRefundViewController *vc = SPSBRefundViewController.new; vc.spsb_data = self->_showData; [self.navigationController pushViewController:vc animated:true]; }]; [self presentViewController:vc animated:false completion:nil]; return; } NSString *str = [self getOredrStatusData][_showData.spsb_pay_status][0]; SPSBConfirmAlertViewController *vc = [SPSBConfirmAlertViewController alertWithTitle:@"退款申请" content:[NSString stringWithFormat:@"该订单状态(%@)不支持申请退款哦", str]]; [vc setConfirmButtonTitle:nil titleColor:nil action:^{ }]; [self presentViewController:vc animated:false completion:nil]; } #pragma mark - Network Action #pragma mark - UI - (void)setupUI { self.title = @"订单详情"; self.view.backgroundColor = spsb_F5F5F5_color(); [self createBgView]; [self createBottomView]; [self createStatusView]; [self createFirstView]; [self createDetailsView]; } - (void)createBottomView { _bottomView = UIView.new; _bottomView.backgroundColor = spsb_FFFFFF_color(1.f); [self.view addSubview:_bottomView]; [_bottomView makeConstraints:^(JXHConstraintMaker *make) { make.leading.and.trailing.and.bottom.equalTo(0); make.top.equalTo(self.view.safebottom).offset(-56); }]; NSArray *content = @[jxh_getImage(query_service), jxh_getImage(query_phone), @"联系客服", @"拨打热线"]; UIButton *tempButton = nil; for (NSInteger i = 0; i < 2; i ++) { UIButton *button = [UIButton convenienceWithFont:spsb_font(15) target:self action:@selector(bottomButtonAction:)]; [button setTitle:content[i + 2] titleColor:spsb_666666_color() image:content[i] backgroundImage:nil state:JXHButtonControlStateNormal | JXHButtonControlStateHighlighted]; [button setImageEdgeInsets:(UIEdgeInsets){0, -4.5, 0, 4.5}]; [button setTitleEdgeInsets:(UIEdgeInsets){0, 4.5, 0, -4.5}]; button.tag = spsb_queryListDetailsViewBottomButtonTag + i; [_bottomView addSubview:button]; [button makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(0); make.height.equalTo(56); if (tempButton) { make.leading.equalTo(tempButton.trailing); make.width.equalTo(tempButton); make.trailing.equalTo(0); } else { make.leading.equalTo(0); } }]; tempButton = button; } UIView *line = [_bottomView createLine]; [line makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(14); make.bottom.equalTo(self.view.safebottom).offset(-14); make.width.equalTo(jxh_onePixe()); make.leading.equalTo(tempButton); }]; _refundButton = [UIButton convenienceWithFont:spsb_font(17) target:self action:@selector(refundAction)]; [_refundButton setTitle:@"申请退款" titleColor:spsb_3296FB_color() state:JXHButtonControlStateNormal | JXHButtonControlStateHighlighted]; _refundButton.backgroundColor = spsb_FFFFFF_color(1.f); [_bgScrollView addSubview:_refundButton]; [_refundButton makeConstraints:^(JXHConstraintMaker *make) { make.bottom.equalTo(self->_bgScrollView).offset(-26); make.leading.and.trailing.equalTo(0); make.height.equalTo(50); }]; [self judgeBottomView]; } - (void)createStatusView { NSArray *status = _statusDic[_showData.spsb_pay_status]; NSInteger judgeColor = [status[2] integerValue]; if (_statusView) { [_statusView removeFromSuperview]; } _statusView = UIView.new; [_bgScrollView addSubview:_statusView]; [_statusView makeConstraints:^(JXHConstraintMaker *make) { make.leading.and.trailing.and.top.equalTo(0); make.height.equalTo(110); }]; JXHGradientView *bgView = JXHGradientView.new; NSArray *colors; if (judgeColor == 0) { colors = @[(id)spsb_FF6467_color().CGColor, (id)spsb_FF7F85_color().CGColor]; } else { colors = @[(id)spsb_5A61FD_color().CGColor, (id)spsb_3296FB_color().CGColor]; } [bgView setStartPoint:(CGPoint){0, 0} endPoint:(CGPoint){1, 0} colors:colors]; [_statusView addSubview:bgView]; [bgView makeConstraints:^(JXHConstraintMaker *make) { make.edges.equalTo(0); }]; if (judgeColor == 1) { UIImageView *imageView = [[UIImageView alloc] initWithImage:jxh_getImage(inquire_bg)]; [_statusView addSubview:imageView]; [imageView makeConstraints:^(JXHConstraintMaker *make) { make.trailing.equalTo(0); make.top.equalTo(32); }]; } UILabel *title = [UILabel convenienceWithFont:spsb_semiboldFont(20) text:status[0] textColor:spsb_FFFFFF_color(1.f)]; [_statusView addSubview:title]; [title makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.top.equalTo(30); }]; UILabel *tips = [UILabel convenienceWithFont:spsb_font(18) text:status[1] textColor:spsb_FFFFFF_color(1.f)]; [_statusView addSubview:tips]; [tips makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.top.equalTo(title.bottom).offset(11); }]; if (_showData.spsb_remark.length > 0) { tips.text = _showData.spsb_remark; UIButton *detailsButton = [UIButton convenienceWithFont:spsb_font(14) target:self action:@selector(detailsButtonAction)]; [detailsButton setTitle:@"查看详情" titleColor:spsb_FFFFFF_color(1.f) state:JXHButtonControlStateNormal]; detailsButton.backgroundColor = spsb_000000_color(0.25); [detailsButton setLayerCornerRadius:16 corner:UIRectCornerTopLeft | UIRectCornerBottomLeft size:(CGSize){78, 32} clipToBounds:true]; [_statusView addSubview:detailsButton]; [detailsButton makeConstraints:^(JXHConstraintMaker *make) { make.trailing.equalTo(0); make.top.equalTo(20); make.size.equalTo(CGSizeMake(78, 32)); }]; } } - (void)createFirstView { _firstView = UIView.new; _firstView.backgroundColor = spsb_FFFFFF_color(1.f); [_bgScrollView addSubview:_firstView]; [_firstView makeConstraints:^(JXHConstraintMaker *make) { make.leading.and.trailing.equalTo(0); make.width.equalTo(jxh_screenWidth()); make.top.equalTo(110); make.height.equalTo(84); }]; UILabel *timeTitle = [UILabel convenienceWithFont:spsb_font(13) text:_spsb_businessType == SPSBSocialInsurancePurchase ? @"参保月份" : @"缴存月份" textColor:spsb_999999_color()]; [_firstView addSubview:timeTitle]; [timeTitle makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.top.equalTo(16); }]; UILabel *time = [UILabel convenienceWithFont:spsb_font(20) text:_showData.spsb_for_month textColor:spsb_333333_color()]; [_firstView addSubview:time]; [time makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.top.equalTo(timeTitle.bottom).offset(12); }]; UILabel *cityTitle = [UILabel convenienceWithFont:spsb_font(13) text:_spsb_businessType == SPSBSocialInsurancePurchase ? @"参保城市" : @"所在城市" textColor:spsb_999999_color()]; [_firstView addSubview:cityTitle]; [cityTitle makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(20 + jxh_screenWidth() / 2); make.top.equalTo(timeTitle); }]; UILabel *city = [UILabel convenienceWithFont:spsb_font(20) text:_showData.spsb_city textColor:spsb_333333_color()]; city.tag = spsb_queryListDetailsViewCityLabelTag; [_firstView addSubview:city]; [city makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(cityTitle); make.top.equalTo(time); }]; if (_cityArray.count > 1) { UIImageView *arrow = [[UIImageView alloc] initWithImage:jxh_getImage(arrow-down_gray)]; [_firstView addSubview:arrow]; [arrow makeConstraints:^(JXHConstraintMaker *make) { make.centerY.equalTo(time); make.trailing.equalTo(-17); }]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(changeCityAction)]; [_firstView addGestureRecognizer:tap]; } [_firstView createLineWithLocation:JXHLineLocationLeft locationOffset:jxh_screenWidth() / 2 headOffset:20 footOffset:20]; } - (void)createDetailsView { if (_detailsView) { [_detailsView removeFromSuperview]; } _detailsView = UIView.new; _detailsView.backgroundColor = spsb_FFFFFF_color(1.f); [_bgScrollView addSubview:_detailsView]; [_detailsView makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(self -> _firstView.bottom).offset(12); make.leading.and.trailing.equalTo(0); make.bottom.equalTo(self->_bgScrollView).offset(-88); }]; UIView *firstTitleView = UIView.new; [_detailsView addSubview:firstTitleView]; [firstTitleView makeConstraints:^(JXHConstraintMaker *make) { make.top.and.leading.and.trailing.equalTo(0); make.height.equalTo(50); }]; NSString *title; NSString *firstTitle; NSString *firstContent; NSString *secondTitle; NSString *secondContent; NSInteger lines = 1; BOOL isRefund = false; if ([_showData.spsb_pay_status isEqualToString:@"11"] || [_showData.spsb_pay_status isEqualToString:@"15"]) { title = @"退款信息"; firstTitle = _spsb_businessType == SPSBSocialInsurancePurchase ? @"参保姓名\n身份证号\n退款原因\n订单号" : @"购买人姓名\n身份证号\n退款原因\n订单号"; NSString *refund = _showData.spsb_refund_reason.length > 13 ? [NSString stringWithFormat:@"%@...", [_showData.spsb_refund_reason substringWithRange:NSMakeRange(0, 13)]] : _showData.spsb_refund_reason; firstContent = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", _showData.spsb_user_name, _spsb_purchasers.spsb_id_card, refund, _showData.spsb_order_no]; secondTitle = @"原路退回"; secondContent = _showData.spsb_pay_channel; isRefund = true; } else { lines = 0; title = _spsb_businessType == SPSBSocialInsurancePurchase ? @"参保信息" : @"缴存信息"; firstTitle = _spsb_businessType == SPSBSocialInsurancePurchase ? @"参保姓名\n身份证号\n支付方式\n订单号" : @"购买人姓名\n身份证号\n支付方式\n订单号"; firstContent = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", _showData.spsb_user_name, _spsb_purchasers.spsb_id_card, _showData.spsb_pay_channel, _showData.spsb_order_no]; secondTitle = _spsb_businessType == SPSBSocialInsurancePurchase ? @"社保\n服务费" : @"公积金\n服务费"; secondContent = _spsb_businessType == SPSBSocialInsurancePurchase ? [NSString stringWithFormat:@"¥%.2lf\n¥%.2lf", _showData.spsb_shebaos.floatValue, _showData.spsb_shebao_charge.floatValue] : [NSString stringWithFormat:@"¥%.2lf\n¥%.2lf", _showData.spsb_funds.floatValue, _showData.spsb_fund_charge.floatValue]; if (![_showData.spsb_card_charge isEqualToString:@"0"]) { secondTitle = [secondTitle stringByAppendingString:@"\n社保卡"]; secondContent = [secondContent stringByAppendingFormat:@"\n¥%.2lf", _showData.spsb_card_charge.floatValue]; } if (![_showData.spsb_pre_charge isEqualToString:@"0"]) { secondTitle = [secondTitle stringByAppendingString:@"\n预付费"]; secondContent = [secondContent stringByAppendingFormat:@"\n¥%.2lf", _showData.spsb_pre_charge.floatValue]; } secondTitle = [secondTitle stringByAppendingString:@"\n现金券(抵扣)"]; secondContent = [secondContent stringByAppendingFormat:@"\n- ¥%.2lf", _showData.spsb_coupon_price.floatValue]; } if ([_showData.spsb_pay_status isEqualToString:@"15"]) { firstTitle = [firstTitle stringByAppendingString:@"\n申请时间"]; firstContent = [firstContent stringByAppendingFormat:@"\n%@", _showData.spsb_refund_time]; } else { firstTitle = [firstTitle stringByAppendingString:@"\n成交时间"]; firstContent = [firstContent stringByAppendingFormat:@"\n%@", _showData.spsb_pay_time]; } UILabel *firstTitleLabel = [UILabel convenienceWithFont:spsb_font(15) text:title textColor:spsb_333333_color()]; [firstTitleView addSubview:firstTitleLabel]; [firstTitleLabel makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.centerY.equalTo(firstTitleView); }]; [firstTitleView createLineWithLocation:JXHLineLocationBottom headOffset:15 footOffset:0]; UILabel *left = [UILabel convenienceWithFont:spsb_font(14) textColor:spsb_999999_color() limitWidth:jxh_screenWidth()]; [left setAttributedStringWithText:firstTitle lineSpacing:8 lines:0]; [_detailsView addSubview:left]; [left makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(firstTitleView.bottom).offset(27); make.leading.equalTo(15); }]; UILabel *right = [UILabel convenienceWithFont:spsb_font(14) textColor:spsb_666666_5_color() limitWidth:jxh_screenWidth()]; [right setAttributedStringWithText:firstContent textAlignment:NSTextAlignmentRight lineSpacing:8 lineHeight:0 paragraphSpacing:0 lineBreakMode:NSLineBreakByTruncatingTail lines:0]; [_detailsView addSubview:right]; [right makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(firstTitleView.bottom).offset(27); make.trailing.equalTo(-15); }]; UIView *interval = UIView.new; interval.backgroundColor = spsb_F5F5F5_color(); [_detailsView addSubview:interval]; [interval makeConstraints:^(JXHConstraintMaker *make) { make.leading.and.trailing.equalTo(0); make.top.equalTo(right.bottom).offset(27); make.height.equalTo(12); }]; UIView *secondTitleView = UIView.new; [_detailsView addSubview:secondTitleView]; [secondTitleView makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(interval.bottom); make.leading.and.trailing.equalTo(0); make.height.equalTo(50); }]; UILabel *secondeTitleLabel = [UILabel convenienceWithFont:spsb_font(15) text:@"实付款" textColor:spsb_333333_color()]; [secondTitleView addSubview:secondeTitleLabel]; [secondeTitleLabel makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.centerY.equalTo(secondTitleView); }]; UILabel *actual = [UILabel convenienceWithFont:spsb_font(17) text:[NSString stringWithFormat:@"¥%.2lf", _showData.spsb_pay_actual.floatValue] textColor:spsb_FF5E5E_color() textAlignment:NSTextAlignmentRight]; [secondTitleView addSubview:actual]; [actual makeConstraints:^(JXHConstraintMaker *make) { make.trailing.equalTo(-15); make.centerY.equalTo(secondTitleView); }]; [secondTitleView createLineWithLocation:JXHLineLocationBottom headOffset:15 footOffset:0]; left = [UILabel convenienceWithFont:spsb_font(14) textColor:isRefund ? spsb_333333_color() : spsb_999999_color() limitWidth:jxh_screenWidth()]; [left setAttributedStringWithText:secondTitle lineSpacing:8 lines:lines]; [_detailsView addSubview:left]; right = [UILabel convenienceWithFont:spsb_font(14) textColor:spsb_666666_color() limitWidth:jxh_screenWidth()]; [right setAttributedStringWithText:secondContent textAlignment:NSTextAlignmentRight lineSpacing:8 lineHeight:0 paragraphSpacing:0 lineBreakMode:NSLineBreakByTruncatingTail lines:lines]; [_detailsView addSubview:right]; if ([_showData.spsb_pay_status isEqualToString:@"11"] || [_showData.spsb_pay_status isEqualToString:@"15"]) { [left makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(secondTitleView.bottom); make.leading.equalTo(15); make.height.equalTo(50); }]; [right makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(secondTitleView.bottom); make.trailing.equalTo(-15); make.height.equalTo(50); make.bottom.equalTo(0); }]; } else { [left makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(secondTitleView.bottom).offset(27); make.leading.equalTo(15); }]; [right makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(secondTitleView.bottom).offset(27); make.trailing.equalTo(-15); }]; UIView *line = [_detailsView createLine]; [line makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(right.bottom).offset(27); make.leading.and.trailing.equalTo(0); make.height.equalTo(jxh_onePixe()); }]; UIButton *purchaseButton = [UIButton convenienceWithTarget:self action:@selector(goToPurchase)]; [_detailsView addSubview:purchaseButton]; [purchaseButton makeConstraints:^(JXHConstraintMaker *make) { make.top.equalTo(line.bottom); make.leading.and.trailing.and.bottom.equalTo(0); make.height.equalTo(60); }]; UIImageView *icon = [[UIImageView alloc] initWithImage:_spsb_businessType == SPSBSocialInsurancePurchase ? jxh_getImage(search_shebao_jiao) : jxh_getImage(search_gjj_jiao)]; [purchaseButton addSubview:icon]; [icon makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(15); make.centerY.equalTo(purchaseButton); make.size.equalTo(CGSizeMake(36, 36)); }]; UILabel *label = [UILabel convenienceWithFont:spsb_font(16) text:_spsb_businessType == SPSBSocialInsurancePurchase ? @"自助缴社保" : @"自助缴公积金" textColor:spsb_666666_color()]; [purchaseButton addSubview:label]; [label makeConstraints:^(JXHConstraintMaker *make) { make.leading.equalTo(icon.trailing).offset(12); make.centerY.equalTo(purchaseButton); }]; UIImageView *arrow = [[UIImageView alloc] initWithImage:jxh_getImage(list_arrow)]; [purchaseButton addSubview:arrow]; [arrow makeConstraints:^(JXHConstraintMaker *make) { make.trailing.equalTo(-15); make.centerY.equalTo(purchaseButton); }]; } } - (void)judgeBottomView { if ([_showData.spsb_pay_status isEqualToString:@"2"]) { _bottomView.hidden = true; _refundButton.hidden = false; } else { _bottomView.hidden = false; _refundButton.hidden = true; } } - (void)createBgView { _bgScrollView = [UIScrollView convenienceWithBackgroundColor:spsb_F5F5F5_color()]; [self.view addSubview:_bgScrollView]; [_bgScrollView makeConstraints:^(JXHConstraintMaker *make) { make.top.and.leading.and.trailing.equalTo(0); make.bottom.equalTo(self.view.safebottom); }]; } @end #undef spsb_queryListDetailsViewBottomButtonTag #undef spsb_queryListDetailsViewCityLabelTag