Save image in UIImageView to iPad Photos Library

I am creating an iPad app that has several pictures (UIImageViews) in a horizontal scrollview. I want to allow the user to be able to save the images to their Photo Library when they tap on one of the UIImageViews. I like the way Safari handles this matter: you just tap and hold until a pop up menu appears and then click save image. I know there is the "UIImageWriteToSavedPhotosAlbum". But I am a newbie to iOS development and I'm not too sure where to go with it and where to put it (i.e. how to detect which image was tapped).

From what I have found, I have seen people use UIImage instead of UIImageView. Do I need to convert my view to UIImage? If so, how? How do I detect when the user taps the images, and which UIImageView was tapped? If you could point me in the right direction, and maybe some examples I would greatly appreciate it.

7
задан DShah 4 January 2012 в 08:29
поделиться