我有一个 UIButton 子类,我在 IB 中设置了图像,奇怪的是,大约 1/3 的按钮不会响应触摸!发生了什么事?
如上所述,我有一个 UIButton 子类,我正在 IB 中设计它。我已将按钮子类设置为 UIView,并将图像设置为按钮。我在图像下方设置了一个 UILabel,试图赋予它 Finder 的外观。一切都很好,除了图像的右侧 1/3 对触摸没有响应!
这是最奇怪的事情。按钮边界设置为封装整个图像,但右侧 1/3 不会响应。
有人见过这个吗?有人知道发生了什么事吗?
谢谢
As described, I have a UIButton subclass, that I am designing in IB. I have set the button subclass to a UIView, and set an image to the button as well. I have set a UILabel beneath the image, attempting to give it the Finder look. Everything works great, except for the fact that the right 1/3rd of the image won't respond to touch!
It is the strangest thing. The button bounds are set to encapsulate the entire image, but that right 1/3rd won'r respond.
Has anyone seen this before? Does anybody know what's going on?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论