this window status bar.How to make the icon has been relying on the right ? Resize the window , it automatically to the right .
-(void)composeInterface{
NSView *themeFrame=[[self.window contentView] superview];
NSRect themeFrameRect = [themeFrame frame];
NSRect accessoryViewFrame =[self.statusBarBtn frame];
NSRect newFrame = NSMakeRect(30,
themeFrameRect.size.height - accessoryViewFrame.size.height,
accessoryViewFrame.size.width,
accessoryViewFrame.size.height);
[self.statusBarBtn setFrame:newFrame];
// [self.statusBarBtn setFrameOrigin:NSMakePoint(0, 0)];
// [self.statusBarBtn setAutoresizingMask:323];
[themeFrame addSubview:self.statusBarBtn];
}