tags:

views:

154

answers:

1

How could I let a user jot a quick hand-written note on an iPad using a Pogo-like stylus? (Or by using their finger, some kind of stylus makes it more legible feasible.)

Initial thoughts:
1) Open GL canvas?
2) Store the output as a .png/.jpg snapshot of the openGL screen (by taking a screenhot of the iPad?
3) Would the note be limited to one screenshot, could there be a scrollable area notepad to write out a long note?

+3  A: 

You would want to subclass a UIView, UIImageView, or UIScrollView. Then register for touch notifications in that view, and then just keep record of the trail of touch events and CoreGraphics drawing to those points. You can always use the same drawing code but store it in a different graphics context to save it as an image.

You don't need to go as low level as Open GL

Here are a handful of Core Graphics tutorials that are pretty clear.

Here is Apple's sample app Touches that explains touch tracking.

jamone