i actually dont see my error:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *Cel
For me, it worked doing this:
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
UPDATE
Place the above code in the following method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
Just put it BEFORE editing the tableViewCell
Look here: Loading TableViewCell from NIB
This is Apple's document for this exact subject.
//This is assuming you have tvCell in your .h file as a property and IBOutlet
//like so:
TableViewController.h
@property(nonatomic,retain) IBOutlet UITableViewCell *tvCell;
//Data Source Method...
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"TVCell" owner:self options:nil];
cell = tvCell;
self.tvCell = nil;
use the loadNibNamed:owner:options method to load a cell in a nib. Set the cell instance to your nib object, then set the nib object to nil.
Read the rest of the documentation that I've linked to know how to access subviews inside your cell.
Make sure your reuse identifier in your NIB / Storyboard file for your prototype cell matches whatever you called CellIdentifier
static NSString *CellIdentifier = @"Cell";