One Quickie


Draw a string centered in a rectangle (Graphics->General)
    NSString *blah = @"Placeholder Pane";
    NSSize size = [blah sizeWithAttributes: nil];

    NSPoint startPoint;
    startPoint.x = bounds.origin.x + bounds.size.width / 2 - size.width / 2;
    startPoint.y = bounds.origin.y + bounds.size.height / 2 - size.height / 2;

    [blah drawAtPoint: startPoint
          withAttributes: nil];



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com