I add table header xib - and table cells vanish! (XCode6?)



When first trying to add the header to the table view to enable Edit and New functions, after I connect up the view and the buttons, they appear - but the table cells no longer show up. I tried the suggestions from a similar post here - see “Problem Adding Table Header” - but no luck.

When I programmatically create a small UIView and set that to the _headerView in the headerView method, it appears and the table cells are there too.

Could this be an XCode 6 thing? I dont have XCode 5.

I’m stuck at this point of the book! :confused:


So in desperation I installed Xcode 5.1.1 - lo and behold, everything works as stated in the book.

Christian/Aaron, could you perhaps add to your post “Using Xcode 6 with the 4th Edition” what one would have to do differently if not using Xcode 5?

Thanks, cheers.


Solution: when creating the HeaderView.XIB file using XCode 6, before adding the view and the 2 buttons, go to the File Inspector, and in the section “Interface Builder Document”, change the “Opens in” option from “XCode 6” to “Xcode 5.1”.

After that, adding the views and buttons and hooking them up to the File’s Owner, the header and the table cells appear as intended.


Interestingly, I waa then able to change the “Opens in” option back to “XCode 6”, with no apparent ill effects. Ah, the mysteries…