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: Alexander Spohr <email@hidden>
- Date: Wed, 13 Oct 2010 14:53:28 +0200
Am 12.10.2010 um 23:55 schrieb G S:
> - (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())
This if is not needed.
> {
> Stash* pCurrStash = stashes.at(indexPath.row);
Is pCurrStash ever non-nil? Otherwise you get a list that looks empty.
> 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?
No. You would get an infinite loop.
atze
_______________________________________________
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