small medium large xlarge

Generic-user-small
14 Sep 2011, 07:14
Andrew L (2 posts)

First off, great book. The problem I’m having is minor, and may not be a problem at all, but I really want to get to the bottom of it. In the “Shopping List” application, the table header has vertical dividers between the labels. For example, as shown in your screenshots, the dividers are as follows:

 Quantity  |  Purchased  |  Shopping List Items

However, my table header using XCode 4 and Lion, appear like this:

Quantity  |  Purchased  |  Shopping List Items  |

with the trailing divider. is there any way to remove this trailing divider?

Generic-user-small
14 Sep 2011, 10:34
Tim Isted (105 posts)

I suspect this is because the width of the right-hand column in the xib file hasn’t adjusted to fill the remaining space in the table view.

I don’t have my Lion machine with me at the moment, so the following instructions use screenshots from my Snow Leopard install with Xcode 4.0.1…

Open the @MyDocument.xib@ file and expand the list of items on the left so that you can find the relevant table column, as shown here:

(You may need to click the button indicated by the blue arrow bottom left to show this list)

Once you’ve selected the table column, use the resize control indicated by the red arrow to resize the column to fill the table view. Make it just big enough to fill the available space without triggering scroll bars to appear.

Alternatively, the right column should also expand itself automatically to fill if you resize the actual table view in the xib, but this behavior does require certain settings to be set correctly in the table view’s Attributes Inspector panel (check that the Table View’s “Column Sizing” is set to “Last Column Only.”

Generic-user-small
14 Sep 2011, 21:18
Andrew L (2 posts)

Thanks a lot for the quick response, that seemed to fix it.

Generic-user-small
01 Dec 2011, 17:46
Simone Prince (1 post)

Thanks for sharing this!!!

You must be logged in to comment