- (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的更多相关文章

  1. IOS 通过button获取cell

    在使用tableview时,有时我们需要在cell中添加button和label,以便添加某项功能,而且往往点这个button的方法中需要知道button所在cell中label内存放的值. 一般而言 ...

  2. ios uitableview button 获取cell indexpath.row

    在iOS7下面已经无效,因为iOS7的层级关系发生变化 UITableViewCell->UITableViewCellScrollView->UITableViewCellContent ...

  3. 通过控件获取cell

    #pragma mark - 通过控件获取cell -(UITableViewCell*)GetCellFromTableView:(UITableView*)tableView Sender:(id ...

  4. 获取cell中的button在整个屏幕上的位置

    编写cell中得button点击事件 - (IBAction)showButtonClick:(id)sender { UIButton *button = (UIButton *)sender; U ...

  5. objc_setAssociatedObject获取cell上button对应所在的行

    #import <UIKit/UIKit.h> @interface TestCell : UITableViewCell @property (weak, nonatomic) IBOu ...

  6. ios 获取button所在的cell对象, 注意:ios7 =&lt; System Version &lt; ios8 获取cell对象的差别

    ios7 =< System Version< ios8 : ios7 =< System Version < ios8  下 button.superview.supervi ...

  7. 获取cell上按钮事件

    原由:点击cell上的按钮,无法获取button对应的cell位置 //获取按钮上层控件,也就是cell本身 AccountCell *cell= (AccountCell *)[按钮名称 super ...

  8. iOS中获取cell中webview的内容尺寸

    最近项目中遇到在cell中获取webView的内容的尺寸的需求 实现的思路其实很简单 就是通过执行js 获取尺寸即可 为了后面用着方便我直接封装了一个HTML的cell 起名就叫 STHTMLBase ...

  9. 如何通过Button获取UITableViewCell

    发现一个奇怪的问题: 手机(ios7) 2015-06-17 15:11:29.323 ***[1412:60b]  [btn superview] =  UITableViewCellContent ...

随机推荐

  1. left outer join preserving unmatched rows from the first table

    https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj18922.html INNER JOIN operation Specifies a join ...

  2. Hadoop集群搭建-Hadoop2.8.0安装(三)

    一.准备安装介质 a).hadoop-2.8.0.tar b).jdk-7u71-linux-x64.tar 二.节点部署图 三.安装步骤 环境介绍: 主服务器ip:192.168.80.128(ma ...

  3. contentprovider 实例

    Provider端 public class PersonProvider extends ContentProvider { //用来存放所有合法的Uri的容器 private static Uri ...

  4. Struts使用锚

    <a href="exam/ExaminationTrainAction_examTrainDisp#an_${id}"><div id="${id}& ...

  5. XML中CDATA和#PCDATA的区别

    在XML文档中, 能看到“CDATA"的地方有三处: 1)在DTD中,指定标签中某个属性的类型为字符型时,使用CDATA.因为XML解析器会去分析这段字符内容,因而里面如果需要使用>, ...

  6. poj3181【Dollar Dayz】

    做完这道题,心里五味陈杂,明明是最水的一道题,我却做了最长的时间. 题意是求用1-k的和表示n的方案数. 显然是个计数dp,但我不会.思考半小时未果. 然后找尹鹏哲,他给我讲了个错的dp方程,结果调试 ...

  7. Understand JavaScript’s “this” With Clarity, and Master It

    The this keyword in JavaScript confuses new and seasoned JavaScript developers alike. This article a ...

  8. 关于Spring Security的笔记

    1.web.xml配置文件 加载Spring Security,将DelegatingFilterProxy配置在DispatcherServlet之前. <filter> <fil ...

  9. 看 迪杰斯特拉(Dijsktra)算法体会

    迪杰斯特拉 看啊哈算法中迪杰斯特拉算法体会: 算法思路 : 1.先找到源头到其他点的最短路: 2.以最短路作为中转点进行比较,用一个dis数组保存源头到他的最优距离 3.用循环进行最优筛选: #inc ...

  10. hdu-4989 Summary(水题)

    题目链接: Summary Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others) P ...