How to increase header height in Cocoa app?

I have the following code to configure 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 do I increase the height of the window title bar, such as the Mac App Store app?

-1
source share
1 answer

In fact, the App Store app does not have a title. This is probably an abuse of Apple’s own user interface rules. Therefore, do not emulate them.

+2
source

All Articles