First I ought to qualify my question by saying that I’m a complete beginner hoping to learn Cocoa (with some C, WinAPI and Visual Studio experience), and whilst I’m waiting for the delivery of a couple of books on Objective-C and Cocoa (thanks to those who recommended the books on this forum), I thought I’d play around with Interface Builder before abandoning GUI stuff for a while and getting into the nitty gritty. I have what is hopefully a very basic question relating to split views in interface builder:
I would like to implement a vertical split view. This is easy if I’m only using two elements, but I want to do it with three, one on one side, two on the other. For instance: If I take a table view and drag it to the left of my window, then take a text view and drag it to the right, then select both and click on Layout > Make Subviews of > Split View, Interface Builder detects that I want a vertical split view and works very nicely. However, if I place a text view on the left and then on the right of it place, say, a table view at the top and an outline view at the bottom, where the top of the table view is aligned to the top of the text view and the bottom of the outline view is aligned to the bottom of the text view, I have problems. The setup would be like this:
| || |
| || |
where the double lines represent where the split view should be. I have tried selecting the two elements on the right - the table view and outline view, for instance - and grouping them, then selecting both the group and the table view, and then clicking on Layout > Make Subviews of > Split View, but this only creates a horizontal split view - moving both the elements on the right below the left window. If I then change the attributes to “Vertical”, all of the items are stretched rather than restoring there original size, so that my whole design has been ruined.
Is there an easy way of doing this? All the documentation I can find just says that if my items are ordered left-to-right then a vertical split view should automatically be created, but none of it details what to do if you have an object on the left and a group of view items - rather than a single view - on the right.
If this is stuff I can figure out on my own once I’ve plowed through a Cocoa book, please forgive me - I’m admittedly jumping the gun a bit here.