Name

NSView — Mac OS X 10.0

Synopsis

This is the Cocoa interface to Mac OS X’s graphics APIs, including Quartz 2D, OpenGL (using NSOpenGLView), and QuickDraw (using NSQuickDrawView). Anything that is drawn to screen in Cocoa is done so within a view object. Developers can implement custom drawing behavior by subclassing NSView and overriding the drawRect: method. See Chapter 3 for more information on how views relate to other classes in the AppKit.

image with no caption

@interface NSView : NSResponder
                                  // Initializers
   - (id)initWithFrame:(NSRect)frameRect;
                                  // Accessor Methods
   - (void)setBoundsSize:(NSSize)newSize;
   - (void)setFrameOrigin:(NSPoint)newOrigin;
   - (void)setFrame:(NSRect)frameRect;
   - (NSRect)frame;
   - (void)setAutoresizingMask:(unsigned int)mask;
   - (unsigned int)autoresizingMask;
   - (void)setUpGState;
   - (void)setBoundsRotation:(float)angle;
   - (float)boundsRotation;
   - (void)setAutoresizesSubviews:(BOOL)flag;
   - (BOOL)autoresizesSubviews;
   - (void)setNeedsDisplayInRect:(NSRect)invalidRect;
   - (void)setBoundsOrigin:(NSPoint)newOrigin;
   - (void)setFrameRotation:(float)angle;
   - (float)frameRotation;
   - (void)setNeedsDisplay:(BOOL)flag;
   - (BOOL)needsDisplay;
   - (void)setToolTip:(NSString *)string;
   - (NSString *)toolTip;
   - (void)setFrameSize:(NSSize)newSize;
   - (void)setBounds:(NSRect)aRect;
   - (NSRect)bounds;
   - (void)setPostsFrameChangedNotifications:(BOOL) ...

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.