镔哥,就直接写了个demo用来做参考:
//
// ViewController.h
// TableView多选删除
//
// Created by apple on 14/12/9.
// Copyright (c) 2014年 youdianshang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController<UITableViewDataSource,UITableViewDelegate>
{
UITableView *tableView;
}
@property(nonatomic,strong)NSMutableArray *dataArray;
@property(nonatomic,strong)NSMutableArray *selectedDic;
@property(nonatomic,strong)UIBarButtonItem *rightBtn;
@end
//
// ViewController.m
// TableView多选删除
//
// Created by apple on 14/12/9.
// Copyright (c) 2014年 youdianshang. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize dataArray;
@synthesize selectedDic;
- (void)viewDidLoad {
[super viewDidLoad];
[self greatNav];
[self initData];
// Do any additional setup after loading the view, typically from a nib.
}
//导航栏设置
-(void)greatNav
{