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;}
- (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,
c.size.height - aV.size.height,
aV.size.width,
aV.size.height);
[accessoryView setFrame:newFrame];
[themeFrame addSubview:accessoryView];
}
How do I increase the height of the window title bar, such as the Mac App Store app?
source
share