0

我正在 Cocoa 中开发一个带有两个自定义视图的小应用程序。自定义视图由两个独立的类控制。我在我的 AppDelegate 中设置了一个 NSTimer,它要求其中一个视图自行绘制,但问题是两个视图都在绘制。

我的方法如下所示:

- (void)timerMethod:(NSTimer *) theTimer
{
    [theOtherView setNeedsDisplay:YES];    // The View that needs to be drawn
    [theBackGroundView setNeedsDisplay:NO];    // Doesn't really do anything, thought it might though.
}

我希望有人能指出我应该如何绘制我的观点的方向。

4

0 回答 0