开发者

IPhone image with clickable hotspots

I'd like to know how to implement a clickable image for an iPhone application using objective C. I want this image to be clickable at specific areas even when it is rotated. If for instance the top of an image goes to page A, and this gets rotated clockwise by 90 degrees I want this clickable area to change a开发者_如何学编程ccordingly.

Is this possible?


hmmm, you could place UIButton's (with custom backgrounds) next to each other to make up the image (like a puzzle) and then group them into a UIView and instead of rotating the UIImageView you could rotate the UIView which should still enable the clickable areas.


You might be able to use an HTML web page with an image and map then display the image in a UIWebView.

When rotating the phone, rotate the UIWebView and let the image map do the rest.

This might not be exactly what you're after depending on the application.


Programmatically throw a transparent UIButton on top of the image wherever you want a hot spot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜