O'Reilly logo

Beginning Mac OS® X Programming by Drew McCormack, Michael Trent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.4. Chapter 4

A.4.1. Exercise 1 solution

  1. Change all the labels so that they are pinned to the upper-left corner. The Autosizing control should look like the one shown in Figure A-3.

    Figure A.3. Figure A-3
  2. Change all the text fields so that they are pinned to the upper edge of the window, and so that they are flexible in the horizontal direction. The Autosizing control should look like the one shown in Figure A-4.

    Figure A.4. Figure A-4
  3. Change the OK and Cancel buttons so that they are pinned to the lower-right corner. The Autosizing control should look like the one shown in Figure A-5.

    Figure A.5. Figure A-5
  4. Enable the window's close, minimize, and resize controls by checking these items in the Inspector's Attributes view.

  5. Set the window's minimum size to the window's current size by clicking the appropriate Current button in the Inspector's Size view.

A.4.2. Exercise 2 solution

  1. Create a new CocoaApplication project. Your nib window appears, containing a menu bar and window instances. You won't need the menu bar instance; delete it if you like.

  2. Drag the NSTabView object from the Containers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required