1

I am quite new to Cocoa and I am looking for the control/view that is used in Contacts App "main" view. Specifically with the scrolling behaviour seen below, where a line appears when you scroll:

Scroll behavior

I have been experimenting with NSStackView and NSTableView. I believe they are using a NSStackView with a NSTableView in the middle...

So far no luck, any tips or pointers to get a similar look to the Contacts App would be greatly appreciated. I am using storyboards (if that changes anything).

scx
  • 3,221
  • 1
  • 19
  • 37
  • 1
    From the app root to that table view, likely split view -> custom view -> scroll view -> table view. The custom view likely has a fixed height header and a fixed height footer, with the scrollview containing the table constrained to the edges of each... stack view looks like more overhead than necessary to me. – stevesliva Sep 16 '15 at 04:31
  • Hmmm, this does bring me to another question I've been having trouble finding answers to. How do you make a simple "box" in Cocoa? Using NSBox doesn't provide the desired effect. Or, how would you create those "headers/footers" in the custom view? I imagine it is very simple once you know about it :) – scx Sep 16 '15 at 05:14
  • 1
    Any view or control in IB can be a box with constraints. For constraints, look to the tiefighter icon |-[]-| in IB. But if you have several views or controls within the box, like the buttons in the footer, wrap them in a custom view. You can also have any "custom view" box in IB point to a totally separate XIB. – stevesliva Sep 16 '15 at 05:17
  • Thank you so much for taking the time to help me out! IB & Cocoa is definitely something I've been missing out on :) – scx Sep 16 '15 at 06:06

0 Answers0