user1567956
user1567956

Reputation: 131

Programmatically create a grouped-style UITableView

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.

Upvotes: 2

Views: 10946

Answers (3)

Matthias
Matthias

Reputation: 8180

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];

Upvotes: 1

sujith1406
sujith1406

Reputation: 2822

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];

Upvotes: 2

bitmapdata.com
bitmapdata.com

Reputation: 9600

refer a following code.

UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,your_width,your_height) style:UITableViewStyleGrouped];

Upvotes: 6

Related Questions