Sorry for the newb question. I am just trying to create a view
programatically, then add it to window and color it. But when I run it I do
not see the colored view.
Can you please point as to what I am doing wrong. Following is my code -

NSView * windowView = [[self window] contentView];
NSRect windowViewBounds = [windowView bounds];
 NSView * subView = [[NSView alloc]
initWithFrame:NSInsetRect(windowViewBounds, 20, 20)];
[windowView addSubview:subView];
 NSView * drawView = subView; // subView
[drawView lockFocus];
 [[NSColor grayColor] set];
 NSRectFill([drawView bounds]);
 [drawView unlockFocus];


Thanks,
-sp
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to