我新的IOS ..添加导航栏的UITableView编程
我要的是有超过UITableView
导航栏,这里面我-(void) loadView
我的代码是这样创造.. 。
(void)loadView {
[super loadView];
CGRect frame = CGRectMake(0, 0, 320, 480); //define size and position of view
tableView1= [[UITableView alloc]initWithFrame:frame style:UITableViewStylePlain ];
tableView1.editing=YES;
tableView1.dataSource=self;
tableView1.delegate=self;
//navigationItem= [[UIBarButtonItem alloc]initWithTitle:@"Names" style:UIBarButtonItemStyleBordered target:self action:@selector(first:) ];
//self.navigationItem.leftBarButtonItem=btnBarItem;
[self.view addSubview:tableView1];
}
我想对我分配的,这样我可以插入一个添加按钮的tableview导航栏..
任何帮助将是一个高度ppreciated ...
发生了什么呢上面显示它解决你的问题:) ??????????? – 2012-08-11 12:46:03
可能重复[以编程方式向UITableViewController添加NavigationBar?](http://stackoverflow.com/questions/2700990/adding-a-navigationbar-to-uitableviewcontroller-programmatically) – 2015-11-12 15:49:44