| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537 |
- //
- // KeHuBianMaSearchTC.m
- // IBOSSIPAD
- //
- // Created by iHope on 14-8-14.
- // Copyright (c) 2014年 elongtian. All rights reserved.
- //
- #import "CustomerCodeSearchVC.h"
- #import "ChannelSearchVC.h"
- #import "CustomerTypeSearchVC.h"
- @interface CustomerCodeSearchVC()<UISearchBarDelegate,UITableViewDataSource,UITableViewDelegate>{
- UITextField *txtCode;
- UITextField *txtCustomerName;
- UIButton *_btnSearch;
-
- }
- @property(nonatomic,strong) ASIDownManager *mDownManager;
- @property(strong) IBOutlet UISearchBar *searchBar;
- @property(strong) UITableView *tableView;
- @end
- @implementation CustomerCodeSearchVC
- #pragma mark - 公共函数
- /**
- viewDidLoad函数
- */
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- self.navigationItem.title=@"客户编码";
- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
- [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
- forState:UIControlStateNormal];
- [button addTarget:self action:@selector(goBack)
- forControlEvents:UIControlEventTouchUpInside];
- button.frame = CGRectMake(0, 0, 15, 18);
-
- UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
- self.navigationItem.leftBarButtonItem = menuButton;
- self.navigationController.navigationBar.barTintColor = NavigationBarTintColor;
- self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor],NSFontAttributeName : [UIFont boldSystemFontOfSize:16]};
- _tableView=[UITableView new];
- _tableView.delegate=self;
- _tableView.dataSource=self;
- _tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
- _tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
- _tableView.frame=CGRectMake(0, 0, Screen_Width, Screen_Height-40) ;
- [self.view addSubview:_tableView];
- _searchBar=[[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
- _searchBar.delegate=self;
- [self initHeaderView];
- }
- /**
- 修改:2017-9-25
- 适配机型
- 安全区视图发生变化
- */
- -(void)viewSafeAreaInsetsDidChange{
- _tableView.frame = CGRectMake(0, 0, SCREENWIDTH, self.view.safeAreaLayoutGuide.layoutFrame.size.height-40);;
- _btnSearch.frame=CGRectMake(20, self.view.safeAreaLayoutGuide.layoutFrame.size.height-40,Screen_Width-40,35);
- [super viewSafeAreaInsetsDidChange];
- }
- /**
- 初始化函数
- */
- -(id)init
- {
- self =[super init];
- if(self){
- _channelStr=@"";
- _customerTypeStr=@"";
- }
- return self;
- }
- /**
- 取消进度条函数
- */
- -(void)dealloc
- {
- [self cancel];
- }
- #pragma mark - 委托函数
- //客户编码数据加载完成
- - (void)onLoadFinish:(ASIDownManager *)sender {
- NSDictionary *dic = [sender.mWebStr JSONValue];
- [self cancel];
- if (dic && [dic isKindOfClass:[NSDictionary class]]) {
- int iStatus = [[dic objectForKey:@"Status"] intValue];
- NSString *message=[dic objectForKey:@"Message"];
- if (iStatus == 0) {
- NSArray * approvArr=[dic objectForKey:@"Result"];
- if(approvArr!=nil)
- {
-
-
- if(approvArr!=nil&&approvArr.count>0){
- _searchArr=[[NSMutableArray alloc] init];
- for(int i=0;i<approvArr.count;i++){
- NSDictionary * dic=approvArr[i];
- NSInteger fillingId=[[dic objectForKey:@"FilingID"]integerValue];
- NSInteger customerId=[[dic objectForKey:@"CustomerID"]integerValue];
- NSString *customerCode=[dic objectForKey:@"CustomerCode"];
- NSString *customerName=[dic objectForKey:@"CustomerName"];
- NSString *channelName=[dic objectForKey:@"ChannelName"];
- NSInteger channelId=[[dic objectForKey:@"ChannelID"]integerValue];
- NSString *telephone=[dic objectForKey:@"Telephone"];
- NSString *address=[dic objectForKey:@"Address"];
- NSString *staffName=[dic objectForKey:@"StaffName"];
- NSInteger staffId=[[dic objectForKey:@"StaffID"]integerValue];
- NSInteger customerTypeId=[[dic objectForKey:@"CustomerType"]integerValue];
- NSString *customerTypeName=[dic objectForKey:@"CustomerTypeName"];
- NSInteger organizationId=[[dic objectForKey:@"OrganizationID"]integerValue];
- NSString *organizationName=[dic objectForKey:@"OrganizationName"];
- NSString *organizationCode=[dic objectForKey:@"OrganizationCode"];
- NSInteger districtId=[[dic objectForKey:@"District"]integerValue];
- NSString *districtName=[dic objectForKey:@"DistrictName"];
- NSString *contacts=[dic objectForKey:@"Contacts"];
- CustomerCodeSearchModel *searchModel=[CustomerCodeSearchModel new];
- searchModel.filingId=fillingId;
- searchModel.customerId=customerId;
- searchModel.customerCode=customerCode;
- searchModel.customerName=customerName;
- searchModel.channelId=channelId;
- searchModel.channelName=channelName;
- searchModel.telephone=telephone;
- searchModel.address=address;
- searchModel.staffId=staffId;
- searchModel.staffName=staffName;
- searchModel.districtId=districtId;
- searchModel.districtName=districtName;
- searchModel.customerTypeId=customerTypeId;
- searchModel.customerTypeName=customerTypeName;
- searchModel.organizationId=organizationId;
- searchModel.organizationCode=organizationCode;
- searchModel.organizationName=organizationName;
- searchModel.contacts=contacts;
- [_searchArr addObject:searchModel];
- }
- }
- else{
- [self showAlertViewText:@"未找到匹配结果"];
- return;
-
- }
- _tableView.separatorStyle=UITableViewCellSeparatorStyleSingleLine;
- [self.tableView reloadData];
- }
- }
- else if(iStatus==ActionResultStatusAuthError
- ||iStatus==ActionResultStatusNoLogin
- ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
- [self showReLoginDialog:message];
- return;
- }
- else {
- [self.tableView reloadData];
- [self showAlertViewText:message];
-
-
- }
-
- }
- }
- //客户编码数据加载失败
- - (void)onLoadFail:(ASIDownManager *)sender {
- [self cancel];
- [self.tableView reloadData];
- [self showAlertViewText:@"加载失败"];
- }
- -(void)textEnd:(id)sender customerCode:(NSString*)code;{
-
- }
- -(void)department:(NSString*)organizationId organizationCode:(NSString*)code organizationName:(NSString*)name{
-
- }
- -(void)salesman:(NSString*)salesmanId salesmanName:(NSString*)salesmanName{
-
- }
- //tableview的分区数
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- {
- return 1;
- }
- //tableview的行数
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- return _searchArr.count;
- }
- //获取tableviewcell
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *CellIdentifier = @"Cell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier ];
- if(cell==nil)
- {
- cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
-
- }
- CustomerCodeSearchModel *searchModel=_searchArr[indexPath.row];
-
- NSString *code=searchModel.customerCode;
- if (code == nil || code.length ==0) {
- code=searchModel.telephone;
- }
- NSString *name=searchModel.customerName;
- cell.textLabel.textAlignment=NSTextAlignmentCenter;
- cell.textLabel.text=[[code stringByAppendingString:@"-"] stringByAppendingString:name];
- cell.textLabel.font=orderTextFont;
- return cell;
- }
- //选中tableviewcell
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- CustomerCodeSearchModel *searchModel=_searchArr[indexPath.row];
- NSString *customerCode=searchModel.customerCode;
- if (customerCode == nil|| customerCode.length ==0) {
- customerCode = searchModel.telephone;
- }
- UIButton *btn=[UIButton new];
- btn.tag=1301;
- if([_flag isEqualToString:@"salesOrder"]){
- if([self.orderDelegate respondsToSelector:@selector(getCustomerOrder:)]){
- [self.orderDelegate getCustomerOrder:searchModel];
- }
- [self.navigationController popViewControllerAnimated:YES];
-
- }
- else if([_flag isEqualToString:@"otherInStorage"]){
- [self.navigationController popViewControllerAnimated:YES];
- if([self.orderDelegate respondsToSelector:@selector(getCustomerOrder:)]){
- [self.orderDelegate getCustomerOrder:searchModel];
- }
- }
- else
- {
- [self dismissViewControllerAnimated:YES completion:^(void){
-
- if([self.orderDelegate respondsToSelector:@selector(textEnd:customerCode:)]){
- [self.orderDelegate textEnd:btn customerCode:customerCode];
- }
-
-
- }];
-
- }
-
- }
- //searchbar开始编辑
- - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar
- {
- [self addCancelButton];
- return YES;
- }
- //searchbar替换文本
- - (BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
- {
- return YES;
- }
- //searchbar编辑结束
- - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
- {
-
- if ([searchText isEqualToString:@""]) {
- self.filterArr = _searchArr;
- [_tableView reloadData];
- return;
- }
-
- NSString *keyName = @"";
- keyName = @"OrganizationName";
- //< 模糊查找
- // NSPredicate *predicateString = [NSPredicate predicateWithFormat:@"%K contains[cd] %@ Or %K contains[cd] %@", keyName, searchText,@"OrganizationCode",searchText];
- NSPredicate *predicateString = [NSPredicate predicateWithFormat:@"%K contains[cd] %@ Or %K contains[cd] %@", keyName, searchText,@"OrganizationCode",searchText];
-
- //< 精确查找
- // NSPredicate *predicateString = [NSPredicate predicateWithFormat:@"%K == %@", keyName, searchText];
-
- NSLog(@"predicate %@",predicateString);
- NSMutableArray *filteredArray = [NSMutableArray arrayWithArray:[_searchArr filteredArrayUsingPredicate:predicateString]];
-
- self.filterArr = filteredArray;
- [_tableView reloadData];
- }
- //取消搜索按钮
- - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
- {
- [searchBar resignFirstResponder];
- [self cancelSearch];
- }
- //scrollview开始拖拽函数
- - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
- {
- [_searchBar resignFirstResponder];
- [self.view endEditing:YES];
- [self cancelSearch];
- }
- -(void)channel:(NSString *)channelId channelName:(NSString *)channelName{
- [_btnChannel setTitle:channelName forState:UIControlStateNormal];
- [_btnChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _channelStr=channelId;
-
- }
- -(void)customerType:(NSString *)customerTypeId customerTypeName:(NSString *)customerTypeName{
- [_btnCustomerType setTitle:customerTypeName forState:UIControlStateNormal];
- [_btnCustomerType setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _customerTypeStr=customerTypeId;
- }
- #pragma mark - 私有函数
- //取消进度条函数
- - (void)cancel {
- [self stopLoading];
-
- }
- //加载数据函数
- -(void)reloadData
- {
- [self startLoading];
- _searchArr=[NSMutableArray new];
- _filterArr=[NSMutableArray new];
- self.mDownManager = [[ASIDownManager alloc] init];
- _mDownManager.delegate = self;
- _mDownManager.OnImageDown = @selector(onLoadFinish:);
- _mDownManager.OnImageFail = @selector(onLoadFail:);
- NSString *urlStr = ServerURL;
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetCutomersDataSource" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:txtCode.text forKey:@"CustomerCode"];
- [dict setObject:txtCustomerName.text forKey:@"CustomerName"];
- [dict setObject:_channelStr forKey:@"ChannelID"];
- [dict setObject:_customerTypeStr forKey:@"CustomerType"];
- [_mDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- //返回按钮
- -(void)goBack
- {
- if([_flag isEqualToString:@"salesOrder"]||[_flag isEqualToString:@"otherInStorage"]){
- [self.navigationController popViewControllerAnimated:YES];
-
- }
- else{
- [self dismissViewControllerAnimated:YES completion:^(void){
- }];
- }
- }
- //初始化查询条件UI
- -(void)initHeaderView
- {
- UIView *headerView=[UIView new];
- headerView.frame=CGRectZero;
- UILabel *lblCode=[UILabel new];
- lblCode.text=@"客户编码";
- lblCode.font=orderTextFont;
- lblCode.frame=CGRectMake(15, 10, 100, 22);
- [headerView addSubview:lblCode];
- txtCode=[UITextField new];
- txtCode.placeholder=@"客户编码和客户名称不能同时为空";
- txtCode.font=orderTextFont;
- txtCode.frame=CGRectMake(CGRectGetMaxX(lblCode.frame)+10,10, SCREENWIDTH - (CGRectGetMaxX(lblCode.frame)+10), 22);
- UIView *codeSeparator=[[UIView alloc]init];
- codeSeparator.frame=CGRectMake(CGRectGetMaxX(lblCode.frame)+10,CGRectGetMaxY(txtCode.frame)+10,Screen_Width-CGRectGetMaxX(lblCode.frame)+10, 1);
- codeSeparator.backgroundColor=LineBackgroundColor;
- [headerView addSubview:codeSeparator];
- [headerView addSubview:txtCode];
-
- UILabel *lblName=[UILabel new];
- lblName.text=@"客户名称";
- lblName.font=orderTextFont;
- lblName.frame=CGRectMake(15,CGRectGetMaxY(codeSeparator.frame)+10, 100, 22);
- [headerView addSubview:lblName];
- txtCustomerName=[UITextField new];
- txtCustomerName.placeholder=@"客户编码和客户名称不能同时为空";
- txtCustomerName.font=orderTextFont;
- txtCustomerName.frame=CGRectMake(CGRectGetMaxX(lblName.frame)+10,CGRectGetMaxY(codeSeparator.frame)+10, SCREENWIDTH - (CGRectGetMaxX(lblName.frame)+10), 22);
- [headerView addSubview:txtCustomerName];
- UIView *nameSeparator=[[UIView alloc]init];
- nameSeparator.frame=CGRectMake(CGRectGetMaxX(lblName.frame)+10,CGRectGetMaxY(txtCustomerName.frame)+10,Screen_Width-CGRectGetMaxX(lblName.frame)+10, 1);
- nameSeparator.backgroundColor=LineBackgroundColor;
- [headerView addSubview:nameSeparator];
-
- UILabel *lblChannel=[UILabel new];
- lblChannel.frame=CGRectMake(15,CGRectGetMaxY( nameSeparator.frame)+10, 100, 22);
- lblChannel.text=@"渠 道";
- lblChannel.font=orderTextFont;
- [headerView addSubview:lblChannel];
- _btnChannel=[UIButton buttonWithType:UIButtonTypeCustom];
- _btnChannel.frame=CGRectMake(CGRectGetMaxX(lblChannel.frame)+10,CGRectGetMaxY( nameSeparator.frame)+10, 150, 25);
- _btnChannel.titleLabel.font=orderTextFont;
- [_btnChannel setTitle:@"请选择渠道" forState:UIControlStateNormal];
- [_btnChannel setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
- _btnChannel.contentHorizontalAlignment=UIControlContentHorizontalAlignmentLeft ;
- [_btnChannel addTarget:self action:@selector(showChannelAlert) forControlEvents:UIControlEventTouchUpInside];
- [headerView addSubview:_btnChannel];
- UIButton *btnArrow=[UIButton new];
- UIImage *btnArrowImg= [UIImage imageNamed:@"rightarrow"];
- btnArrow.frame=CGRectMake(Screen_Width-21, CGRectGetMaxY( nameSeparator.frame)+15,btnArrowImg.size.width,btnArrowImg.size.height);
- [btnArrow setBackgroundImage:btnArrowImg forState:UIControlStateNormal];
-
- [headerView addSubview:btnArrow];
-
- UIView *channelSeparator=[[UIView alloc]init];
- channelSeparator.frame=CGRectMake(CGRectGetMaxX(lblChannel.frame)+10,CGRectGetMaxY(_btnChannel.frame)+10,Screen_Width-CGRectGetMaxX(lblChannel.frame)+10, 1);
- channelSeparator.backgroundColor=LineBackgroundColor;
- [headerView addSubview:channelSeparator];
- //客户性质
- UILabel *lblCustomerType=[UILabel new];
- lblCustomerType.frame=CGRectMake(15,CGRectGetMaxY(channelSeparator.frame)+10, 100, 25);
- lblCustomerType.text=@"客户性质";
- lblCustomerType.font=orderTextFont;
- [headerView addSubview:lblCustomerType];
- _btnCustomerType=[UIButton buttonWithType:UIButtonTypeCustom];
- _btnCustomerType.frame=CGRectMake(CGRectGetMaxX(lblCustomerType.frame)+10,CGRectGetMaxY(channelSeparator.frame)+10, 150, 25);
- [headerView addSubview:_btnCustomerType];
- _btnCustomerType.titleLabel.font=orderTextFont;
- [_btnCustomerType setTitle:@"请选择客户性质" forState:UIControlStateNormal];
- [_btnCustomerType setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
- _btnCustomerType.contentHorizontalAlignment=UIControlContentHorizontalAlignmentLeft ;
- [_btnCustomerType addTarget:self action:@selector(showCustomerTypeAlert) forControlEvents:UIControlEventTouchUpInside];
- [headerView addSubview:_btnCustomerType];
- UIButton *btnCustomerTypeArrow=[UIButton new];
- btnCustomerTypeArrow.frame=CGRectMake(Screen_Width-21, CGRectGetMaxY(channelSeparator.frame)+15,btnArrowImg.size.width,btnArrowImg.size.height);
- [ btnCustomerTypeArrow setBackgroundImage:btnArrowImg forState:UIControlStateNormal];
-
- [headerView addSubview:btnCustomerTypeArrow];
- UIView *typeSeparator=[[UIView alloc]init];
- typeSeparator.frame=CGRectMake(CGRectGetMaxX(lblCustomerType.frame)+10,CGRectGetMaxY(lblCustomerType.frame)+10,Screen_Width-CGRectGetMaxX(lblCustomerType.frame)+10, 1);
- typeSeparator.backgroundColor=LineBackgroundColor;
- [headerView addSubview:typeSeparator];
- headerView.frame=CGRectMake(0, 0, self.navigationController.view.bounds.size.width, CGRectGetMaxY(typeSeparator.frame));
-
-
- _btnSearch=[UIButton buttonWithType:UIButtonTypeCustom];
- _btnSearch.frame=CGRectMake(20, Screen_Height-rectNavHeight-rectStatusHeight-35-5,Screen_Width-40,35);
- _btnSearch.layer.cornerRadius=5;
- [_btnSearch setBackgroundColor:NavBarItemColor];
- [_btnSearch setTitle:@"查询" forState:UIControlStateNormal];
- _btnSearch.titleLabel.font = [UIFont systemFontOfSize: 16.0];
- [_btnSearch addTarget:self action:@selector(goSearch) forControlEvents:UIControlEventTouchUpInside];
- [self.view addSubview:_btnSearch];
- _tableView.tableHeaderView=headerView;
- UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(resighKey)];
- tap.numberOfTapsRequired = 1;
- tap.cancelsTouchesInView = NO;
-
- [self.tableView addGestureRecognizer:tap];
-
- }
- //渠道查询
- -(void)showChannelAlert{
- ChannelSearchVC *channel=[[ ChannelSearchVC alloc] init];
- channel.channelDelegate=self;
- channel.subview=YES;
- [self.navigationController pushViewController:channel animated:YES];
-
- }
- //客户性质
- -(void)showCustomerTypeAlert{
- CustomerTypeSearchVC *customerType=[[CustomerTypeSearchVC alloc] init];
- customerType.orderDelegate=self;
- customerType.subview=YES;
- [self.navigationController pushViewController:customerType animated:YES];
-
- }
- //查询客户编码
- -(void)goSearch
- {
- [self.view endEditing:YES];
- NSString *customerCode= txtCode.text;
-
- NSString *customerName=txtCustomerName.text;
- if((customerCode==nil||[customerCode isEqualToString:@""])&&(customerName==nil||[customerName isEqualToString:@""])){
- [self showAlertViewText:@"客户编码与客户名称不能同时为空"];
- return;
- }
- // NSString *channelName= _btnChannel.titleLabel.text;
- // if([channelName isEqualToString:@"请选择渠道"]){
- // [self showAlertViewText:@"请选择渠道"];
- // return;
- // }
-
- [self reloadData];
-
- }
- //添加取消按钮
- -(void)addCancelButton
- {
- //添加取消按钮
- UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
- [button2 addTarget:self action:@selector(cancelSearch)
- forControlEvents:UIControlEventTouchUpInside];
- button2.frame = CGRectMake(0, 0, 40, 24);
- [button2 setTitle:@"取消" forState:UIControlStateNormal];
- [button2 setTitleColor:NavBarItemColor forState:UIControlStateNormal];
- UIBarButtonItem *menuButton2 = [[UIBarButtonItem alloc] initWithCustomView:button2];
- self.navigationItem.rightBarButtonItem = menuButton2;
- }
- //取消搜索
- -(void)cancelSearch
- {
- [_searchBar resignFirstResponder];
- [self removeCancel];
- }
- //移除取消按钮
- -(void)removeCancel
- {
- self.navigationItem.rightBarButtonItem = nil;
- }
- //收键盘
- -(void)resighKey{
- [self.tableView endEditing:YES];
- }
- @end
|