imagemap in objective c
i want to make something like this http://www.htmlcodetutorial.com/images/images_famsupp_220.html
and i want to know if there is class to do it in object开发者_开发百科ive c? thx
if i understood you correctly, you want to have several sensitive points on an image view?
try adding
-(void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *) event
{
NSLog(@"Touches: %@", touches); //examine this!
}
to your code.
it provides UITouch instances in the touches-set, each having an location point for your views.
checkout
UITouch locationInView:;
regs.
UIWebView
supports image maps. If you want a pure Objective-C solution I would recommend using an UIImageView
and capture touches where you would like to map the image. Once some one touches the view you can then call the appropriate action.
精彩评论