Getting an NSView's size
Getting an NSView's size
- Subject: Getting an NSView's size
- From: Candide Kemmler <email@hidden>
- Date: Tue, 10 Jul 2001 13:50:08 +0200
Hi,
I'm trying to request an NSView's size like I would with
java.awt.Component.getSize () in java.
I tried (in drawRect:(NSRect)frame):
NSLog ( @"the frame is %d, %d, %d, %d", frame.origin.x, frame.origin.y,
frame.size.width, frame.size.height );
and
NSLog ( @"the bounds are %d, %d, %d, %d", [self bounds].origin.x, [self
bounds].origin.y, [self bounds].size.width, [self bounds].size.height );
...but both yield 0,0,0,0
I thought the bounds would provide the information I want, but I
apparently don't get something here...
CK