Wednesday, June 8, 2011

Redo Undo in Paint feature !!

Finally, here is the most awaited code of the current request queues.
Well. I have implemented a very basic example of how to implement Redo- Undo using UIBezierPath.



MyLineDrawingView  is the drawing class (UIView subclass) where UIBezierPath are drawn.

DrawingController is the UIViewController subclass on which I have added redo-undo buttons along with the  MyLineDrawingView.

UI looks very crude and ugly .. I apologize but  I wanted to get the feature done to get the developers an idea.

Well I just want to stick some icons here so that this ugly posting may look little cute !

Download the code here






6 comments:

  1. Thats really Creat! with out using - (void)drawRect:(CGRect)rect
    can we implement

    ReplyDelete
    Replies
    1. Hi,
      Can a UIBezierPath be drawn on the UIView without needing to put the code in the drawRect routine?
      Thanks.
      Jason

      Delete
  2. Thanks for the sharing. It is so cool. Also, how can I save a png or jpg file after I finish drawing?

    ReplyDelete
  3. thanx friend..this post is very Easy to understand and also helps to develop paint application
    but i am Finding some methode through wich we can make movie that we had drawn on iPad

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. A swift version would be very helpful. I also need to integrate with an eraser function. Any idea how I should proceed? Many thanks!

    ReplyDelete