如何防止UIBarButtonItem的侧面可点击? [英] How to prevent side area clickable of UIBarButtonItem?

查看:50
本文介绍了如何防止UIBarButtonItem的侧面可点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

`

每当我单击该区域时,也会对此执行操作.

Whenever i click on this area , action also perform on this.

推荐答案

不用担心这种行为,如果没有其他元素,iOS会在元素附近自动点击.

Don't worry about this behavior, iOS auto tapp near element if there is not other element.

如果您确实想防止单击除外"按钮,则必须将Element放在未使用的区域上,该区域应继承自 UIControl 或能够获得 UserInteraction .

If you really want to prevent to click except button, then you have to put Element on unused area which should be inherited from UIControl or able to get UserInteraction.

这篇关于如何防止UIBarButtonItem的侧面可点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆