Repeating background image in an NSView

前端 未结 3 800
天命终不由人
天命终不由人 2021-02-01 10:28

I am trying to draw a repeating background image in my NSView, I have this till now:

// INIT
- (id)initWithFrame:(NSRect)frame {
  if (self = [super initWithFram         


        
3条回答
  •  日久生厌
    2021-02-01 11:04

    You can create a pattern color with +[NSColor colorWithPatternImage:] and then just fill the background rectangle with that "color". That should do what you want to accomplish.

提交回复
热议问题