views:

510

answers:

1

I have a table that I created within xcode so there is no nib file in this case. I want to make my table into the 'Grouped' style but im not sure how.

I think it has somthing to do with the method below, the problem is Im not really sure how to call it, I do understand how methods work I'm just not too sure on where to start with this one:

- (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)UITableViewStyleGrouped

So could someone tell me how to call it? The problem is that its not a method I wrote its a built in one so I could put that line into my header file but how would I use it in my implementation file?

Thanks guys,

A: 

It sounds like you need to get a better understanding of how objective-c works. What you have given us is not a method, but a method declaration. In your controllers viewDidLoad:, you would do something like:

table = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStyleGrouped];
Kyle Decot
Thanks very much :)
Dave