// // FKPacketIdCardController.m // FirstLink // // Created by jack on 15/11/28. // Copyright © 2015年 FirstLink. All rights reserved. // #import "FKPacketIdCardController.h" #import "FLControllerHelper.h" #import "FKPacketIdCardCenter.h" #import "ShakeRedPacketController.h" #import "FKShareListController.h" @interface FKPacketIdCardController () @end @implementation FKPacketIdCardController - (instancetype)initWithOrderId:(NSString *)orderId{ self = [super init]; if (self) { FKPacketIdCardCenter *packet = [[FKPacketIdCardCenter alloc]init]; packet.orderId = orderId; self.idCardCenter = packet; } return self; } - (void)viewDidLoad { [super viewDidLoad]; [self hideDefaultLeftNaviItem]; } - (void)configNavBar{ self.navigationItem.title = @"绑定身份信息"; UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"关闭" style:UIBarButtonItemStylePlain target:self action:@selector(backToHome)]; [rightItem setTitleTextAttributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15]} forState:UIControlStateNormal]; self.navigationItem.rightBarButtonItem = rightItem; // if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { // self.navigationController.interactivePopGestureRecognizer.delegate = nil; // } } - (void)backToHome{ [FLControllerHelper backToMainController]; } - (void)goToBack{ [self goToShakePacket]; } - (void)upLoadFinish{ [self goToShakePacket]; } - (void)goToShakePacket{ ShakeRedPacketController *shakeVc = [[ShakeRedPacketController alloc]init]; FKPacketIdCardCenter *packCenter = (FKPacketIdCardCenter *)self.idCardCenter; if ([packCenter isKindOfClass:[FKPacketIdCardCenter class]]) { shakeVc.orderID = packCenter.orderId; } NSMutableArray *arrayM = [NSMutableArray arrayWithArray:self.navigationController.viewControllers]; [arrayM removeLastObject]; [arrayM addObject:shakeVc]; [self.navigationController setViewControllers:arrayM animated:YES]; } - (void)configActionBtnInPickCell:(FKBindIdCardPickCell *)pickCell{ pickCell.moreIdBtn.hidden = YES; pickCell.moreIdBtn.userInteractionEnabled = NO; pickCell.cancelBtn.hidden = NO; pickCell.cancelBtn.userInteractionEnabled = YES; if (self.idCardCenter.idCardItemList.count > 0) { pickCell.moreIdBtn.hidden = NO; pickCell.moreIdBtn.userInteractionEnabled = YES; } [pickCell.saveBtn setBackgroundColor:UIColorFromRGB(0xff6362)]; [pickCell.saveBtn setTitle:@"保存并分享" forState:UIControlStateNormal]; } - (void)configTipCell:(FKBindTipCell *)tipCell{ tipCell.titleLabel.text = @"请为您购买的直邮商品补全身份证信息"; tipCell.iconImgView.image = [UIImage imageNamed:@"red_alert"]; } #pragma mark - UIGestureRecognizeDelegate //- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { // return NO; //} @end