I have a simple custom view in my Mac OS X application that is essentially empty. Here is the code:
@implementation MyDrawingView
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}
- (void)drawRect:(NSRect)dirtyRect
{
NSLog(@"bounds:x:%f y:%f w:%f h:%f", self.bounds.origin.x, self.bounds.origin.y, self.bounds.size.width, self.bounds.size.height);
}
@end
Here is the output of NSLog:
bounds:x:0.000000 y:0.000000 w:713.000000 h:509.000000
I read about user space here: Coordinate Systems and Transforms
Does this mean that my view is going to show 713/72 inches wide on screen? It doesn't show up that wide in reality. I have a background color set on my view so I can see it just as wide as it really is.