-1

I have the following code for setting up my interface in a Cocoa application:

#import <Foundation/Foundation.h>
@interface uiview : NSObject {
    IBOutlet NSWindow *mainWindow;
    IBOutlet NSView *accessoryView;}


// Methods
- (void)composeInterface;
-(IBAction)button : (id)sender;
@end

#import "uiview.h"

@implementation uiview

- (void)awakeFromNib
{
    [self composeInterface];
    [mainWindow setTitleWithRepresentedFilename:@"/Users/parag/Documents/UIview"];
}
- (void)composeInterface
{
    NSView *themeFrame = [[mainWindow contentView] superview];
    NSRect c = [themeFrame frame];  
    NSRect aV = [accessoryView frame];
    NSRect newFrame = NSMakeRect(
                                 c.size.width - aV.size.width,   // x position
                                 c.size.height - aV.size.height, // y position NSPoint
                                 aV.size.width,  // width
                                 aV.size.height);        // height //NSSize
    [accessoryView setFrame:newFrame];
    [themeFrame addSubview:accessoryView];
}

How can I increase the height of the window's title bar area, like the Mac App Store application does?

Parag Bafna
  • 22,812
  • 8
  • 71
  • 144
  • As a comment, you may want to not name your class "uiview" because it a) doesn't follow Cocoa capitalization style and b) is the name of a class in UIKit, which may find its way onto the Mac at some point. – Brad Larson Sep 19 '11 at 16:13

1 Answers1

2

Actually, the App Store app has no title bar. This is probably an abuse of Apple's own user interface guidelines. So don't emulate them.

JeremyP
  • 84,577
  • 15
  • 123
  • 161
  • Actually, i want to add button on title bar. but height of title bar is less so its not looking good. – Parag Bafna Aug 09 '11 at 04:18
  • 1
    The buttons should go in the toolbar which, since leopard does not have a line between it and the title bar. – JeremyP Aug 09 '11 at 07:33