以前の「ラベルボックス」を無くして解放する方法は?オブジェクトを離しても、タップして移動すると、「ラベル ボックス」の上に新しい「ラベル ボックス」が作成されます。
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesMoved:touches withEvent:event];
CGPoint nowPoint = [[touches anyObject] locationInView:self.view];
CGPoint prevPoint = [[touches anyObject] previousLocationInView:self.view];
CGRect RectFrame1;
RectFrame1 = CGRectMake(nowPoint.x, nowPoint.y, 280, 30);
UILabel *label = [[UILabel alloc] initWithFrame:RectFrame1];
label.text = [NSString stringWithFormat:@"x %f y %f", nowPoint.x, nowPoint.y];
label.backgroundColor = [UIColor blackColor];
label.textColor = [UIColor whiteColor];
[self.view addSubview:label];
[label release];
//[self release];
//[&RectFrame1 release];
}