I have a viewcontroller set up on my storyboard, and I have inserted a tableView inside this view controller. I want to do a [self.tableView reloadData];
on viewDidLoad, but it says the property tableView isn't found.
Here is what the code for my tableView in the viewcontroller.m file looks like:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
return @"Shared with";
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return activeUsers.count;
}
- (sharedUsersTable *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"sharedUser";
sharedUsersTable *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[sharedUsersTable alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
NSDictionary *key = [activeUsers objectAtIndex:indexPath.row];
NSString *name = [key objectForKey:@"shared_user_name"];
NSString *email = [key objectForKey:@"email"];
cell.textLabel.text = [NSString stringWithFormat:@"%@", name];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@", email];
return cell;
}
Am I missing some special command to call a tableView inside a view controller which isn't a TableViewCOntroller?