Reputation: 131
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
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
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
Reputation: 9600
refer a following code.
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,your_width,your_height) style:UITableViewStyleGrouped];
Upvotes: 6