13

I'm having a weird issue that I'm really not sure what to do about. The problem is simple: In one Xcode project (both in Xcode 5 and Xcode 6 Beta 4), I see "Content" and "Prototype Cells" when I click on a UITableView in a storyboard file:

Expected result

However, in another project, these are simply not appearing in an XIB file:

Actual result

Does anyone have any idea how to get "Content" and "Prototype Cells" to consistently appear in both .storyboard and .xib files? Thanks!

rebello95
  • 8,486
  • 5
  • 44
  • 65
  • 1
    after about 6 years (!) this problem still exists. for others facing this problem: you can't use this attribute when using .xib file. check this if just need 1 cell in it: https://stackoverflow.com/a/62369167/5853262 – Mahdi Moqadasi Jun 14 '20 at 06:36

2 Answers2

3

I hope you are looking this UITableView in the Storyboard only.

When I was looking for your problem's solution I found the below observations :

  1. When I Drag TableView over a View Controller / TableViewController to storyboard, Then I found First screenshot in Attribute Inspector.

When I created a xib file by using File-> New-> File -> Objective C file and selected UitableViewController with interface builder.

Then I found Second screenshot in Attribute Inspector.

I hope this might help you.

R_Developer
  • 864
  • 1
  • 7
  • 10
  • Wow that's a really good observation. I didn't even realize that in one project I was using an XIB file and the other had a storyboard file (late night). Any idea how to get this to work in XIB files (I've edited my question)? Thanks so much! – rebello95 Aug 23 '14 at 18:10
  • @rebllo85: Thanks for that. Can you please select the above answer as correct one? – R_Developer Aug 25 '14 at 10:17
  • even though this didn't solve the problem, it pointed me in the right direction. Accepted, thanks. – rebello95 Aug 25 '14 at 15:27
  • Regarding your question, I guess no there isn't any settings available by which we can get "Content" and "Prototype Cells" to consistently appear in both .storyboard and .xib files. Still, I will look look for more on this. – R_Developer Aug 26 '14 at 07:08
  • I currently understand that you can not use dynamic prototype table in .xib files, you can create it in the story board or you must do it by code. – jc.vargas.valencia Dec 09 '19 at 23:24
  • That is actually very disappointing, storyboards grow like crazy, and this is the only way to insert custom cells in tableviews? – Joan Pérez Nov 11 '20 at 11:25
2

Similar Issue Here - beginner here, so my wording may be incorrect (apologise in advance)

Description: When opening Main Storyboard and clicking on the TableView "view controller" icon I don't see "Content Attribute" within the "Attribute Inspector"

Issue: It looks like the actual table within the scene needs to be selected. When in Storyboard view and clicking on TableView view controller icon, this shows the attributes of the scene for TableView, which is not what you want, you want to select the actual table and not the entire TableView scene.

Resolution: I found two ways to select the actual table itself. 1.) with the TableView view controller selected, press the tab key(this cycles you though each object within a scene), until the table is selected. (the table should appear highlighted) 2.) Above the project view, I have the navigation bar, where I see the hierarchical view of my entire project. Like the following: Main.storyboard --> TableView Scene --> TableView --> etc. Under Tableview I clicked on "Table View" and this highlighted the Table. For me, method 1 & 2 worked and now I'm able to see the content attribute "Dynamic Prototypes" under "Table View" of the "Attributes Inspector"