Re: The dreaded "UITableView won't refresh" problem.
Re: The dreaded "UITableView won't refresh" problem.
- Subject: Re: The dreaded "UITableView won't refresh" problem.
- From: G S <email@hidden>
- Date: Tue, 12 Oct 2010 14:55:52 -0700
> You expect a mailing list consisting of people reading in their spare time, and writing out of charity, most of whom have been doing their paying jobs in the few hours since you first posted, to drop everything to respond? Lovelier still.
Your assumptions are incorrect.
Thanks to everyone who responded. I don't have any other hidden
instance; I'm working in the tree view in the IB doc window so I can
be sure to see what's there.
I have implemented the cellForRowAtIndexPath and numberOfRowsInSection
delegate methods as required, and those methods ARE being called.
The setup in IB looks like this:
http://farm5.static.flickr.com/4049/5076024257_50d1d1f5de_b_d.jpg
and the code for tableView:(UITableView*)tableView
cellForRowAtIndexPath:(NSIndexPath*)indexPath is pretty much the
boilerplate example that Apple provides, with changes for my data
storage:
- (UITableViewCell*) tableView:(UITableView*)tableView
cellForRowAtIndexPath:(NSIndexPath*)indexPath
{
UITableViewCell* cell = [tableView
dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil)
{
cell = [[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:@"MyIdentifier"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if(indexPath.row < stashes.size())
{
Stash* pCurrStash = stashes.at(indexPath.row);
if(pCurrStash)
{
cell.textLabel.text = [NSString
stringWithUTF8String:pCurrStash->getName().c_str()];
//UIImage* theImage = [UIImage imageWithContentsOfFile:path];
//cell.imageView.image = theImage;
}
}
return cell;
}
I'm not supposed to call reloadData in that function, am I? Thanks again.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden