我新的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