+ (CustonCell *)cellFromNibNamed:(NSString *)nibName
{
NSArray *nibContents = [[NSBundlemainBundle] loadNibNamed:nibName owner:self options:NULL];
NSEnumerator *nibEnumerator = [nibContentsobjectEnumerator];
KIPullToRevealCell *customCell = nil;
NSObject* nibItem = nil;
while ((nibItem = [nibEnumerator nextObject]) != nil)
{
if ([nibItem isKindOfClass:[KIPullToRevealCellclass]])
{
customCell = (CustonCell *)nibItem;
break;
}
}
return customCell;
}
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *stCellIdentifier =@"Cell";
CustonCell *cell = (CustonCell *)[tableViewdequeueReusableCellWithIdentifier:stCellIdentifier];
if(!cell)
cell = (CustonCell *)[CustonCellcellFromNibNamed:NSStringFromClass([CustonCellclass])];
return cell;
}