When you have an
NSView instance that is too big to be
displayed in full, you can embed it in a Scroll View component to
provide automatic scrolling support. This is the third and final container view
that we’ll be discussing in the UI component
reference. Its underlying class is
Standalone Scroll Views typically contain a single large view, like
an image or a graphical editor’s canvas area. In general, you should
avoid embedding complex user interfaces like long forms in an
NSScrollView, opting instead to break up the content with a Tab View.
In this chapter, we’ll learn the basic structure of a Scroll
View. This knowledge will not only enable us to scroll large amounts of
content, but also give us more control over the other UI components that rely
Sorry, this is the end of the preview. To read the rest of this chapter, you’ll need to purchase Ry’s Cocoa Tutorial.
Sign up for my low-volume mailing list to find out when new content is released. Next up is a comprehensive Swift tutorial planned for late January.
You’ll only receive emails when new tutorials are released, and your contact information will never be shared with third parties. Click here to unsubscribe.