creating custom UITableViewCell?
I Know this question is asked again and again here, but did not find any
solutions for my problem.I'm creating a Custom UITableViewCell through xib
and trying to load it.in my VC called ACSummaryVC
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"SimpleTableCell";
AcSummaryCell *cell = (AcSummaryCell *)[tableView
dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle]
loadNibNamed:@"AcSummaryCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
}
AcSummaryCell is a subclass of UITableViewCelland it has an UILabel
IBOutlate called acLabel.when i compile the project i get following error-
`Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<ACSummaryVC 0x71465c0> setValue:forUndefinedKey:]: this class
is not key value coding-compliant for the key acLabel.'`
i have created connection of acLabel in AcSummayCell class, but i'm
getting error from ACSummaryVC? What i'm doing wrong?
Edit:- according to Mani's answer bellow i'm connecting outlate to file
owner and it is wrong instead i've to connect outlate to custom cell.but
when i try this i did not get my outlate to connect with instead i'm
getting like this image -
Now question is How to connect my outlate with custom cell?
No comments:
Post a Comment