• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with UITableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with UITableView


  • Subject: Problem with UITableView
  • From: Laurent Daudelin <email@hidden>
  • Date: Sat, 31 Jul 2010 21:17:45 -0700

I've been banging my head on this for over a day now and I just can't find what's wrong with my tableview and the tableview cells.

Basically, as you can see here:

http://nemesys.dyndns.biz/Images/iPhoneScreenshot.png

I have a table view made of 2 sections. Section 1 has only one tableview cell and, right now, it's barebone. Section 2 is supposed to have 4 cells. When I use a cell from my xib file in Interface Builder and the tableview appears, even though my method tableView:cellForRowAtIndexPath: is called 4 times, only the last cell is showing. If I however create the cells programmatically using:

[[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]

then they show up properly. Of course, the cell is created only once because on subsequent calls, I'm using the tableview dequeueReusableCellWithIdentifier:.

I just don't get it. I use the same methods to set the textLabel and the detailTextLabel in both cases. I just tried a few times of dragging a default UITableView cell from the IB's Data Views tab, I don't modify it in any way in IB except to give it a cell identifier and connect it to my tableview controller so it can provide it to its tableview, it just won't work and I get the tableview showing as in the picture above. I want to use a tableview cell in IB because I need to add additional labels to it and don't feel like doing it programmatically.

So, anybody can see what I am missing? I've done the same thing in other iPhone projects I just can't see why I can't do it now and I'm at the end of my rope here.

Thanks in advance for any comment, info or help!

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://www.nemesys-soft.com/
Logiciels Nemesys Software              				email@hidden

_______________________________________________

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

  • Follow-Ups:
    • Re: Problem with UITableView
      • From: Luke Hiesterman <email@hidden>
  • Prev by Date: Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?
  • Next by Date: Re: Determine encoding of file
  • Previous by thread: Re: undefined symbols: NSPathControl
  • Next by thread: Re: Problem with UITableView
  • Index(es):
    • Date
    • Thread