我正在使用OpenGL开发绘画应用程序。 我正在使用“CUSTOM UIView”在屏幕上绘制,并使用另一个UIImageView将背景图像设置为它。 请查看截图以更清楚地了解它。 我的问题是我无法在任何视图上设置背景图像。 我必须使用不同的纹理作为画板来绘画。 有人能建议这种方法有什么错误吗?
我已经使用这段代码自定义UIView,但是没有成功...只显示了默认的白色背景..
- (id)initWithCoder:(NSCoder*)coder {
UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"Rough_White_Paper_with_tape.png"]];
self.backgroundColor = background;
[background release];
}