button 获取 cell
- (
void
)cellBtnClicked:(
id
)sender event:(
id
)event
{
NSSet
*touches =[event allTouches];
UITouch *touch =[touches anyObject];
CGPoint currentTouchPosition = [touch locationInView:_tableView];
NSIndexPath
*indexPath= [_tableView indexPathForRowAtPoint:currentTouchPosition];
if
(indexPath!=
nil
)
{
// do something
}
}
button 获取 cell的更多相关文章
- IOS 通过button获取cell
在使用tableview时,有时我们需要在cell中添加button和label,以便添加某项功能,而且往往点这个button的方法中需要知道button所在cell中label内存放的值. 一般而言 ...
- ios uitableview button 获取cell indexpath.row
在iOS7下面已经无效,因为iOS7的层级关系发生变化 UITableViewCell->UITableViewCellScrollView->UITableViewCellContent ...
- 通过控件获取cell
#pragma mark - 通过控件获取cell -(UITableViewCell*)GetCellFromTableView:(UITableView*)tableView Sender:(id ...
- 获取cell中的button在整个屏幕上的位置
编写cell中得button点击事件 - (IBAction)showButtonClick:(id)sender { UIButton *button = (UIButton *)sender; U ...
- objc_setAssociatedObject获取cell上button对应所在的行
#import <UIKit/UIKit.h> @interface TestCell : UITableViewCell @property (weak, nonatomic) IBOu ...
- ios 获取button所在的cell对象, 注意:ios7 =< System Version < ios8 获取cell对象的差别
ios7 =< System Version< ios8 : ios7 =< System Version < ios8 下 button.superview.supervi ...
- 获取cell上按钮事件
原由:点击cell上的按钮,无法获取button对应的cell位置 //获取按钮上层控件,也就是cell本身 AccountCell *cell= (AccountCell *)[按钮名称 super ...
- iOS中获取cell中webview的内容尺寸
最近项目中遇到在cell中获取webView的内容的尺寸的需求 实现的思路其实很简单 就是通过执行js 获取尺寸即可 为了后面用着方便我直接封装了一个HTML的cell 起名就叫 STHTMLBase ...
- 如何通过Button获取UITableViewCell
发现一个奇怪的问题: 手机(ios7) 2015-06-17 15:11:29.323 ***[1412:60b] [btn superview] = UITableViewCellContent ...
随机推荐
- Communicating sequential processes
the-way-to-go_ZH_CN/01.2.md at master · Unknwon/the-way-to-go_ZH_CN https://github.com/Unknwon/the-w ...
- UVA 10951 - Polynomial GCD(数论)
UVA 10951 - Polynomial GCD 题目链接 题意:给定两个多项式,求多项式的gcd,要求首项次数为1,多项式中的运算都%n,而且n为素数. 思路:和gcd基本一样,仅仅只是传入的是 ...
- docker: Dockerfile命令介绍
前一章介绍了Dockerfile创建镜像的方法,Dockerfile文件都是一些指令,因此要掌握Dockerfile就必须了解这些指令.这一章就介绍下Dockerfile的指令. From: 功能为指 ...
- mysql给一张表新增字段,并设置该字段为外键
首先给usercategory表新增libraryid字段: alter table usercategory add libraryid varchar(50) 修改picturelibrary表的 ...
- window.onerror 错误监听,发到后台
var doc = document.body || document.documentElement; var _onerror = Onerror(''); var Onerror = funct ...
- windowbuilder安装
windowbuilder,也就是原来的SWT Designer.Google收购了Instantiations,把它的工具也重新免费发布了.用过swt designer的人都知它是非常好用的swin ...
- STM32 CAN通信
最近在STM32上开发CAN通信相关内容,转载一篇个人认为不错的文章,看完了基本算明白了,能够实际操作了. 原文地址: https://blog.csdn.net/ludaoyi88/article ...
- windows下的host文件在哪里,有什么作用?
在Window系统中有个Hosts文件(没有后缀名),在Windows98系统下该文件在Windows目录,在Windows2000/XP系统中位于C:\Winnt\System32\Drivers\ ...
- blog.codedream.ren
博客将转到 CodeDream ,新的链接是 http://blog.codedream.ren
- Spark Streaming之二:StreamingContext解析
1.1 创建StreamingContext对象 1.1.1通过SparkContext创建 源码如下: def this(sparkContext: SparkContext, batchDurat ...