我正在开发 GL 油漆应用程序。
要绘制任何对象,我正在使用已实现的 UIView。
起漆方法:
- (void)viewDidLoad {
....
[NSThread detachNewThreadSelector:@selector(paintingObjects)
toTarget:self
withObject:nil];
}
- (void)paintingObjects {
while(1) {
[NSThread sleepForTimeInterval:2];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
ImplementedView *tmp = [self view];
[tmp draw];
[pool drain];
}
}
但它不起作用(不绘制对象)。
这里有什么问题?
请帮帮我。
提前致谢。