indragiek/INAppStoreWindow — Issue #28: Using INAppStoreWindow in conjunction with customView class
Author: AndreasHeiberg
Created: 2012-01-12 15:38:35+00:00
State: open

I'm running into a bug when using the INAppStoreWindow class in conjunction with a custom class I wrote for all my views. I have tried to eliminate any bugs in my class by cutting out any code but the part that sets the views background color.

This is alle the custom code in my class:

- (void)drawRect:(NSRect)dirtyRect {
[[NSColor redColor] set];
NSRectFill([self bounds]);
}

## The problem
The problem/bug happens when the INAppStoreWindow s being resized while containing a view that autoresizes with the window. As you can see in this picture there's a graphic flaw.

![Graphic flaw](http://pixelfrosting.com/dropbox/App-Store-Example.png)

I've found the problem to be the code on line 179 in INAppStoreWindow.m.

[nc addObserver:self selector:@selector(_layoutTrafficLightsAndContent) name:NSWindowDidResizeNotification object:self];
[nc addObserver:self selector:@selector(_layoutTrafficLightsAndContent) name:NSWindowDidMoveNotification object:self];

## The solution?
I simply cannot solve this bug by my own (I'm an epic newbiee). Could you please tell me how you have come around this problem?

Thanks a million for your great work.