• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
View not visible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

View not visible


  • Subject: View not visible
  • From: spsaxena <email@hidden>
  • Date: Thu, 29 Jul 2010 12:31:52 +0530

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@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: View not visible
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: PMSessionBeginPage
  • Next by Date: RE: PMSessionBeginPage
  • Previous by thread: RE: PMSessionBeginPage
  • Next by thread: Re: View not visible
  • Index(es):
    • Date
    • Thread