How We Detect and Save the text Which is Written on iPhone/iPad Touch Screen?

I am having a Table view. If i Write a Word/Text on the iPhone/iPod Touch Screen by using my Finger.

Here my Task is How we detect the text Which is written on the Screen? also How we save that text in my Table ?

Example Link: See this

Actually This is the Code What I Wrote For touchBegun, touchMoved, touchEnd events. This Works fine. But How Can I Achieve the above task?

- (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];
}

Answers


Your question is highlevel and so I will suggest high level approach which you can chase down.

1) From the app, you have to implement gesture recognizers like

– touchesBegan:withEvent: 
– touchesMoved:withEvent:
– touchesEnded:withEvent:

2) This will give you coordinates or PATH of user's touches. Convert them into memory bitmap using

CGContextRef con = CGBitmapContextCreate(NULL,,rgbColorSpace, kCGImageAlphaPremultipliedFirst);

3) Using the path captured from Step1, draw on bitmap context via CoreGraphics Functions. And finally you will get a UIImage.

4) Use OCR such as Tesseract to get text from image and you should be all set.

Good luck!


Need Your Help

jQuery validate - pushing an error to a field

jquery ajax jquery-validate

I have a form with a huge number of fields to be validated; and I use the jQuery Validate plugin for that purpose. There are, however, a few fields that need AJAX validation, and I was forced to no...

Android Intent Always Crashes

java android android-intent crash android-activity

I am trying to switch activities in android using intent. However no matter what I do, this always crashes. I read countless topics on the same question, none of which have helped. So I Am Forced t...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.