指に沿って画面に描画するための非常に簡単なクラスがあります。すべての描画をクリアして、ユーザーが再び描画を開始できるようにするボタンを設定したいと思います。図面を「クリア」するためのボタンのアクション内で何をすべきか理解できません。
			
			1817 次
		
2 に答える
            1        
        
		
-(void)cancelDrawing 
{   
self.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"drawview_blank.jpg"]];
//[anyArrayUsedForDrawing removeAllObjects];
[self setNeedsDisplay];
}
    于 2012-06-18T15:46:07.040   に答える
    
    
            1        
        
		
Ok I found out myself how to do it. It was very simple, but you know, I didn't think about that. I had to empty the array containing the drawings and call the [self setNeedsDisplay] method.
于 2012-06-18T18:30:06.390   に答える