I am creating tableView programmatically i want to set tableView style group but how to give that tableView alloc has only frame how we can set this values.
Asked
Active
Viewed 1.1k times
2
-
Use UITableViewStyleGrouped .... – IronManGill Aug 08 '12 at 08:12
-
possible duplicate of [How can I set a UITableView to grouped style](http://stackoverflow.com/questions/1006663/how-can-i-set-a-uitableview-to-grouped-style) – rob mayoff Aug 08 '12 at 08:13
3 Answers
6
refer a following code.
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,your_width,your_height) style:UITableViewStyleGrouped];

bitmapdata.com
- 9,572
- 5
- 35
- 43
2
you can programmatically add it by this way
tableView = [[[UITableView alloc] initWithFrame:CGRectMake(0,0,320,460) style:UITableViewStyleGrouped] autorelease];
tableView.dataSource = self;
tableView.delegate = self;
[self.view addSubview:tableView];

sujith1406
- 2,822
- 6
- 40
- 60
1
I am not sure, whether I understood your question in the right way, but you can construct a groupe tableView in this way:
UITableView* tview = [[UITableView alloc] initWithFrame:yourFrame style:UITableViewStyleGrouped];

Matthias
- 8,018
- 2
- 27
- 53