I would like to built an iPhone/iPad application to show large images (in a scrollView or something else which support dragging and zooming) that allow user to:
- Touch some where in the image to markup and leave comment
- User can tap on that markup icon/button to view comment in a popOverView
- Edit comment or remove that markup
So I want to ask that:
- How can I get the touch coordinates in image (not screen)?
- How can I draw a markup icon/button at touch point in the image and it would follow image even when dragging, zooming since the image is really large, maybe up to 8000×6000 pixels?
- How can I display comment/note when user touch on markup icon/button in a view like popOverview in iPad?
- Save and load these information.
It is nearly similar to tagging functionality of Facebook App in iPhone.
Any help is appreciated, thank in advance!
1 . You subclass the UIImageView and override the touch methods:
2 . You add and UIButton to the UIImageView
[yourImageView addSubview:yourButton];then set the center of your button to touch coordinates.3 . Just present an popover when user taps on an button. (You can set tag property for buttons to know which button is tapped)
4 . Save data to an plist to documents directory if is not to complex ore use core data.
Good Luck. Just post comments if you need more help.
Edit:
you need to set the user userInteractionEnabled to YES for the UIImageView.
From UIImageView Class Reference