tags:

views:

141

answers:

2

Hi,

I was wondering whether the following scenario is possible; let's say a user draws his own drawing (including text and lines) over another, could the result be saved and then uploaded?

Thanks in advance!

+2  A: 

Yes, this is perfectly possible. You will want to look into creating your own UIView subclass for drawing and you can save the resulting image using core graphics. To upload the image to a server of your choice you could use the NSMutableURLRequest and NSURLConnection classes. If you are a novice developer the first part of this might prove challenging, but it can be done.

mh0rkk
Thank you! Are CoreData and/or SQlite involved in this process as well?
You can save images to CoreData (or SQLite directly) but I doubt you would want to.
Roger Nolan
You can simply save them do the documents directory of the application. You can find this directory like so: NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0];
mh0rkk
A: 

How would you come about using drawRect for the UIView subclass?