当前位置: 代码迷 >> 综合 >> tableview 多选删除
  详细解决方案

tableview 多选删除

热度:82   发布时间:2024-01-11 22:19:50.0

镔哥,就直接写了个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

{

  相关解决方案