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. char的定义在iOS和Android下是不同的

    char is different in iOS and Android!跨平台开发时很容易忽略的非常坑爹的一个区别. 我的需求是实现一个算法,这个算法在iOS和Android下需要保持一致的结果,很 ...

  2. 1.9 Hive常见属性配置

    一.Hive数据仓库位置配置 1. # Hive数据仓库位置配置: 默认位置(hive根目录): /user/hive/warehouse 注意事项: *在仓库目录下,没有对默认的数据库default ...

  3. C#操作cmd

    C#经常操作CMD,使用的话就用下面的2和3进行整理一下使用吧. 1.简单的调用命令不需要回传数据,最简单 public static void ipcmd(object p) { Process p ...

  4. DOM中元素节点、属性节点、文本节点的理解13.3

    节点信息 每个节点都拥有包含着关于节点某些信息的属性.这些属性是:nodeName(节点名称) nodeValue(节点值) nodeType(节点类型) nodeType nodeType 属性可返 ...

  5. lightoj1010【LCS】

    题意: 求最长公共子序列,并且这个子序列是字典序最小. 思路: LCS附一个值,dp[i][j].first代表以i,j的LCS的长度,dp[i][j].second代表LCS结尾元素,然后利用路径输 ...

  6. element走过的坑

    1.想要更改表头颜色,只要在el-table里引入 :header-cell-style="{background:'red'}" 2.el-form自定义表单验证 , 但是左边不 ...

  7. 基于 Laravel 开发 ThinkSNS+ 中前端的抉择(webpack/Vue)踩坑日记

    在上一篇文章< ThinkSNS+基于Laravel master分支,从1到 0,再到0.1>,简单的介绍了 ThinkSNS+ ,这里分享在开发过程中,前端选择的心理活动. Larav ...

  8. Android NFC 整理

    Android NFC基础(多篇) http://blog.csdn.net/think_soft/article/details/8169483

  9. Dwarves, Hats and Extrasensory Abilities Codeforces - 1063C

    https://codeforces.com/contest/1063/problem/C 首先可以想到一个简单做法:先钦定这个直线的斜率k=-1,然后设直线y=-x+b 设黑点放直线上方:如果已知( ...

  10. IIS7开启目录浏览功能

    IIS7开启目录浏览功能: 在右侧操作中点击启用,并在左侧面板中勾选显示字段.