笔记--8.29(自定义tableViewCell)

来源:互联网 发布:阅读软件下载大全 编辑:程序博客网 时间:2024/05/29 07:46

1,自定义tableViewCell时,

_scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];

[self.contentView addSubview:_scrollView];  //子视图应添加在contentView上

//要想点击cell中的图片,需要添加点击手势识别

UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTap:)];
[_scrollView addGestureRecognizer:tap];

0 0