Subview display problem
Subview display problem
- Subject: Subview display problem
- From: DKJ <email@hidden>
- Date: Tue, 28 Oct 2008 06:23:23 -0700
I'm having no luck getting a subview to display. In the awakeFromNib
of the controller I have this:
helpView = [[MyView alloc] init];
[helpView setFrameOrigin:RectCentre( [theView frame] )];
[helpView setFrameSize:NSZeroSize];
[theView addSubview:helpView];
(RectCentre is a function that finds the centre of a rectangle.) In
the help button action I have this:
[[helpView animator] setFrameSize:[theView frame].size];
[helpView setNeedsDisplay:YES];
(I'm sure the button connection is set in IB.) Finally, in the
drawRect: method of MyView I have this:
[[NSColor colorWithCalibratedRed:1.0 green:1.0 blue:0.8 alpha:0.9]
set];
[NSBezierPath fillRect:[self bounds]];
[NSBezierPath strokeRect:[self bounds]];
When I press my Help button, all I see is a small patch of colour
appearing briefly in the main view.
theView does have animation layers. Would this make a difference?
dkj
_______________________________________________
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