简体   繁体   English

自定义UIButton

[英]Custom UIButtons

I need to implement a view with clickable areas just like HTML image maps. 我需要实现一个具有可点击区域的视图,就像HTML图像映射一样。 The background of the view will be an image that fills the entire canvas and the boundaries of each clickable area are different is size and shape. 视图的背景将是一张填充整个画布的图像,并且每个可单击区域的边界在大小和形状上都不同。 What is the best scenario to do this in iPhone? 在iPhone中执行此操作的最佳方案是什么?

您可以使用不可见的按钮。

好了,您可以像将按钮一样轻松地将操作绑定到视图,因此您可以根据需要添加一堆视图,然后在Interface Builder中设置所需的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM