1

I have a NSView hierarchy that is causing issues.

I'd like to apply a static (fixed) patterned image in the background of an IKImageBrowser. My view hierarchy is like so:

NSWindow
-> Content View
->-> MyCustomView
->->-> NSScrollView
->->->-> IKImageBrowser

I tried adding an NSImageView under the NSScrollview, and making the background color [NSColor clearColor] on the Imagebrowser and scroll view, but I end up with horrible graphic glitching issues... I assume because I have two views with clear set. Seems fine when just one clear view.

Does anyone have any advice on how I can achieve a patterned fixed background to the image browser?

mootymoots
  • 4,545
  • 9
  • 46
  • 74

1 Answers1

2

I've figured this out.

I've subclassed NSScrollView and added the background there. I've then made the IKImageBrowserView background transparent. Seems to work.

mootymoots
  • 4,545
  • 9
  • 46
  • 74
  • 1
    Hi! What should I do to have a scrolling background instead ? I also use a patterned image as background, but I would like to see it scrolling down together with the NSScrollView. thanks – aneuryzm Feb 14 '13 at 15:55