//
//  UITableViewCell+Extensions.m
//  DrivoMeter
//
//  Created by Mobi on 2/5/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "UITableViewCell+Extensions.h"

@implementation UITableViewCell (Extensions)

+ (UITableViewCell *)loadCellFromXib:(NSString *)xibName {
  UITableViewCell *result = nil;
  NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:xibName owner:nil options:nil];
  for (id currentObject in topLevelObjects) {
    if ([currentObject isKindOfClass:[UITableViewCell class]]) {
      result = (UITableViewCell *) currentObject;
      break;
    }
  }
  
  return result;
}

@end
