2
我有一個表格視圖。
如果我使用我的手指在iPhone/iPod觸摸屏上書寫文字/文字。我們如何檢測並保存iPhone/iPad觸摸屏上的文字?
這裏我的任務是
我們如何檢測文字寫在屏幕上?
也我們如何在我的表中保存文本?
實例鏈接:See this
其實這是我的代碼寫的東西對於touchBegun,touchMoved,touchEnd事件。 這工作正常。但是我如何才能完成上述任務?
- (void) touchesMoved:(NSSet *)toucheswithEvent:(UIEvent *)event {
NSUInteger touchCount = [touches count];
NSUInteger tapCount = [[touches object] tapCount];
label.text = @"touchesMoved";
statusLabel.text = [NSString stringWithFormat:@"%d touches", touchCount];
tapStatusLabel.text = [NSString stringWithFormat:@"%d taps", tapCount];
}
- (void) touchesBegan:(NSSet *)toucheswithEvent:(UIEvent *)event {
NSUInteger touchCount = [touches count];
NSUInteger tapCount = [[touches object] tapCount];
label.text = @"touchesBegan";
statusLabel.text = [NSString stringWithFormat:@"%d touches", touchCount];
tapStatusLabel.text = [NSString stringWithFormat:@"%d taps", tapCount];
}
- (void) touchesEnded:(NSSet *)toucheswithEvent:(UIEvent *)event {
NSUInteger touchCount = [touches count];
NSUInteger tapCount = [[touches object] tapCount];
label.text = @"touchesEnded";
statusLabel.text = [NSString stringWithFormat:@"%d touches", touchCount];
tapStatusLabel.text = [NSString stringWithFormat:@"%d taps", tapCount];
}
對不起,我編輯我的問題,我試過的代碼。 – iSuresh