我在Interface Builder中拥有一个IKImageView,并将背景色设置为红色,但是在运行该应用程序时它不起作用,它只是保持灰色。
我以此设置背景色:
_imageView.backgroundColor = [NSColor redColor];
[_imageView
设置为IBOutlet IKImageView * _imageView;
]
IKImageView
中有错误。
更好的解决方法:将setImageWithURL:
与nil一起用作参数,并且将构造CALayers也不将任何自定义IKImageView
的方法命名为-(void)commonInit