I have setup a UITableView controller within my view controller as follows:
fieldView = [[UITableView alloc] initWithFrame:CGRectMake(0, logoView.bounds.size.height, 320, (screen.size.height - logoView.bounds.size.height)) style:UITableViewStylePlain];
[fieldView setBackgroundColor:[UIColor greenColor]];
fieldView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleTopMargin;
The view controller is setup to be a TableViewDelegate as follows:
UIViewController <UITableViewDelegate, UITableViewDataSource...
Question: What do I need to do to the table view delegate methods for them to control this added sub view?
#pragma mark -
#pragma Table View Delegate Methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
NSLog(@"Here");
return 1;
}
- (NSString *)tableView:(UITableView *)fieldView titleForHeaderInSection:(NSInteger)section {
NSString *sectionName;
NSLog(@"Here2");
The above methods are in the view controller but not called?
tableView:cellForRowAtIndexPath
is there? – Larme Feb 18 '13 at 17:51