Interface Builder Storyboard Compilation Failed?

Thanks to wufoo I figured mine out.

I have a tableview that has five static cells. The cells have an assortment of UIImageViews, UITextFields, etc. I had created IBOutlets in the main UITableViewController .h file and connected directly to the static cells UITextfields in the storyboard. You can't do that.

Once I removed those connections it compiled fine for me.

It appears you have to connect UIWidgets (textfields, labels, imageviews, etc) in a statically created cell directly to IBOutlets in that cells .h file (NOT, as I did, to IBOutlets in the tableview .h file).

---- UPDATE ----
Ok, so my initial post was not entirely accurate. It appears you CAN connect IBOutlets from subclasses of UITableViewCell directly to the main UITableViewController .h file. You just have to make sure that you set the Table View Content field to "Static Cells". I missed that step.

Here is an image to illustrate: Screenshot Select your storyboard, in the detail pane on the left, ensure that your "Table View" is selected. In the pane on the right select your attributes inspector panel and change from "Dynamic Prototypes" to "Static Cells". Setup your static cells by dragging and dropping your components onto the storyboard, then if you want to link from your components directly to IBOutlet properties on your main ViewController .h file you can.

I discovered the issue I was having was that I set up static cells in storyboard, and then tried to recreate them again dynamically in the delegate method cellForRowAtIndexPath:. That does not work very well. If you use static cells you do not need to use any of the cell setup delegate methods.

Here is some excellent reading that also helped me out: Apple TableView Programming Guide


For what it's worth, the problem seems to be related to two IBOutlet objects declared in my .m file. One was referencing a UISlider and the other a UILabel. I removed the references and then declared them as class variables instead. In viewDidLoad I hooked them up using [self.view viewWithTag:TAG_FROM_STORYBOARD_WIDGET]. Looks like the same solution as mentioned by f.perdition in the link above.