tags:

views:

121

answers:

2

there is a .png image displaying human body skeleton.My query is that how to select diffrent parts of the skeleton like hand,foot,head etc in the image and then after selection control moves into another view which displays information about that selected part.

A: 

I believe you are interested in map tags:

http://www.htmlcodetutorial.com/images/images_famsupp_220.html

Here is another tutorial:

http://www.elated.com/articles/creating-image-maps/

This second one shows how you can link map areas to JavaScript so that you can dynamically display information on the page.

Knix
A: 

I'd probably subclass UIImageView and overwrite touchesEnded:withEvent:

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    // ignore if more than one finger
    if ([touches count] != 1) {
        [self.nextResponder touchesEnded:touches withEvent:event];
        return;
    }

    UITouch *touch = [touches anyObject]; // there's only one object in the set

    // ignore unless the user lifted the finger off the screen
    if (touch.phase != UITouchPhaseEnded) {
        [self.nextResponder touchesEnded:touches withEvent:event];
        return;
    }

    // ignore if double-touch or more
    if ([touch tapCount] != 1) {
        [self.nextResponder touchesEnded:touches withEvent:event];
        return;
    }

    CGPoint locationOfTouch = [touch locationInView:self];

    // TODO: use locationOfTouch.x and locationOfTouch.y to determine which part has been selected
}
Thomas Müller