Q:

I want to add some views to UIButton, for example multiple UILabels, UIImages etc. One I add those view they do not get the touch events. How can I pass the touch events to UIButton?

Thanks

--------

A:

Set the userInteractionEnabled property of each of the subviews you added to your UIButton to NO.

Adding other views to UIButton的更多相关文章

  1. Programming Entity Framework 翻译(1)-目录

    1. Introducing the ADO.NET Entity Framework ado.net entity framework 介绍 1 The Entity Relationship Mo ...

  2. Xib的使用与File'Owner总结

    Xib的使用与File'Owner总结 一.XIB的适用范围 xib(也叫Nib)与storyboard一样是用来描述界面的. storyboard描述的是比较大型的,大范围.适合描述界面跳转等. 二 ...

  3. 【转】iOS学习之Autolayout(代码添加约束) -- 不错不错

    原文网址:http://www.cnblogs.com/HypeCheng/articles/4192154.html DECEMBER 07, 2013 学习资料 文章 Beginning Auto ...

  4. [置顶] UITableViewCell

    UITableViewCellStyle: 四种Cell类型. UITableViewCellSeparatorStyle 分割线类型.(group三种,plain两种) UITableViewCel ...

  5. 【iOS】Xib的使用与File'Owner总结

    一.XIB的适用范围 xib(也叫Nib)与storyboard一样是用来描写叙述界面的. storyboard描写叙述的是比較大型的,大范围.适合描写叙述界面跳转等. 二.XIB的使用 Xib是小范 ...

  6. Ultimate guide to learning AngularJS in one day

    What is AngularJS? Angular is a client-side MVC/MVVM framework built in JavaScript, essential for mo ...

  7. UITableView编辑模式

    UITableView有两种模式,普通模式和编辑模式.在编辑模式下可以对cell进行排序.删除.插入等等. 如何进入编辑模式 调用tableView的setEditing(editing: Bool, ...

  8. Collection View Programming Guide for iOS---(六)---Creating Custom Layouts

    Creating Custom Layouts 创建自定义布局 Before you start building custom layouts, consider whether doing so ...

  9. wesome-android

    awesome-android Introduction android libs from github System requirements Android Notice If the lib ...

随机推荐

  1. [转载]Doxygen C++ 注释风格

    转载自:http://luchenqun.com/?p=761 做一个C++方面的符合Doxygen的注释文档,备用. 1.头文件根原文件注释.这个我也不知道需要注释什么.能想到的是:谁写的,里面有些 ...

  2. 1.6-1.8 HBase表的物理模型

    一.HBase 物理模型 1. 1.Table中的所有行都按照row key的字典序排列: 2.Table在行的方向上分割为多个Region: 3.Region按天小分割的,每个表开始只有一个regi ...

  3. Identity Server 4 原理和实战(完结)_----选看 OAuth 2.0 简介(下)

    https://www.yuque.com/yuejiangliu/dotnet/asu0b9 端点 Endpoint Authorization Endpoint,授权端点 在浏览器里面和用户交互 ...

  4. [CVE-2017-8464]Microsoft Windows远程命令执行漏洞复现

    版权声明:本文为博主的原创文章,未经博主同意不得转载 前言 记录下自己的复现,保留意见 2017年6月13日,微软官方发布编号为CVE-2017-8464的漏洞公告,官方介绍Windows系统在解析快 ...

  5. 洛谷1087 FBI树 解题报告

    洛谷1087 FBI树 本题地址:http://www.luogu.org/problem/show?pid=1087 题目描述 我们可以把由“0”和“1”组成的字符串分为三类:全“0”串称为B串,全 ...

  6. zepto+mui开发中的tap事件重复执行

    zepto.js和mui一起使用的时候,因为都有tap事件绑定tab事件后会多次触发还会报错,这时不引用zepto中的touch.js就可以了,只用mui的tap相关事件. $(function () ...

  7. hdu2147(yy)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2147 题意:给出一个n*m的矩阵,一开始有个点在最右上方, 两个人轮流移动点,可以向左移一格,或者向下 ...

  8. Spring源码(一)

    <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</lis ...

  9. Java 执行linux命令(转)

    转自 http://blog.csdn.net/a19881029/article/details/8063758 java程序中要执行linux命令主要依赖2个类:Process和Runtime 首 ...

  10. ebullient(2018.10.25)

    结论巨好想,每一次操作可以看作把一个b往前移一位,另一个b往后移一位,逆序对个数不改变,判断即可做第一问. 此处代码仅给出第一问做法: #include<cstdio> #include& ...