xcode: Creating a zoomable image with buttons inside
Hello and first of all a happy new year to everyone!! I'm new to Stack Overflow but I used it often to get answers to my questions. But now I'm standing at the wall with no idea to get further on.
What I want to do: xcode - iPad Project
- App is having a very big picture (4000px to 5000px)
- App should start with picture scaled down to see the whole image
- Picture should be z开发者_StackOverflow社区oomable and dragable
- If picture is zoomed out you should have several buttons or selectable areas (invisible buttons) to display (pop up) a textfield. These buttons should also be zoomed wihtin the image. So
Example: Picture of a face
- Face is zoomed out and so the eye fills the whole display
- User touches the eyebrow
- A pop up is shown with a table "The eyebrow protects the eye from dust"
Point 1 and 2(and 3) I was able to set up with the tutorial from this Site: http://vimeo.com/1642150
You need to hook up the delegate method for the UIScrollView.
- (void)scrollViewDidZoom:(UIScrollView *)scrollView
{
if (scrollView.zoomScale > EXTRA_INFO_THRESHOLD)
{
[self displayExtraInfoLayer];
}
else
{
[self hideExtraInfoLayer];
}
}
Id guess you could dump those buttons into a UIView container and add that to the view hierachy in displayExtraInfoLayer
above the scrollview.
精彩评论