Subclass NSView to change background color

后端 未结 1 1522
难免孤独
难免孤独 2020-12-20 08:11

I want to change the background color of a custom view. I have a subclass NSView something like that:

#import 
@interface CustomBGView :         


        
相关标签:
1条回答
  • 2020-12-20 09:08

    You're storing the argument to changeColor: in an instance variable, but not retaining it, so you don't own it and it thinks it can go away.

    0 讨论(0)
提交回复
热议问题