cell里面
typedef void(^ TouXiang)(NSString *); // 文章ID
@property (nonatomic, copy) TouXiang myTouXiang; // 传文章ID的Block
-(void)tapAction{
NSLog(@"点击了头像。");
self.myTouXiang(@"1");
}
tablvew 里面:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"cell";
Comment_Cell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[Comment_Cellalloc] initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:cellIdentifier];
}
///最好放在这里。。。
cell.myTouXiang = ^(NSString *tempS){
if (self.isMyComment) {
MyCommentModel *myCommentModel = _myComment_dataArr[indexPath.row];
self.articl_id = myCommentModel.comment_id;
self.pinglunID = myCommentModel.cmted_user_id;
} else {
CommentMe *commentMeModel = _commentMe_dataArr[indexPath.row];
self.articl_id = commentMeModel.comment_id;
self.pinglunID = commentMeModel.cmt_user_id;
}
MySendOutViewController *sendVC = [[MySendOutViewControlleralloc]init];
sendVC.friend_user_id = self.pinglunID;
[self.viewController.navigationControllerpushViewController:sendVC animated:YES];
};
相关推荐
GIF图过大不能上传,大家到博客里看吧:http://www.henishuo.com/ios-cell-embed-tableview/ 最好到GITHUB下载最新代码,博客文章末尾有下载地址。
swift ,使用autolayout + storyboard 最外层tableview列表,cell里面嵌套了tableview,自适应内容,cell里的tableview不可滑动,内容全部显示,且文字分行显示,不用设置cell的高度直接可以自适应内容
Github最新版本:https://github.com/netyouli/WHC_AutoLayoutKit 你们的支持是我前进的动力
感谢博主的http://blog.csdn.net/woaifen3344/article/details/50779743博客,有灵感去模仿和改造做出目前类似微博或者朋友圈的界面,...这是我的github的demo地址:https://github.com/huangping35/cell-tableviewDemo
IOS开发 tableview中cell的用法 值得拥有
ios开发 3d tableview效果不错哦
随着业务的发展,页面的复杂度越来越高,嵌套滚动视图的方式也越来越受设计师们的青睐,在各大电商App十分常见。如下Demo图: 但是这样的交互官方并不推荐,而且对开发来说确是不那么友好,需要处理滚动手势的冲突,...
iOS无限展开tableview
TableView的Cell上播放视频
IOS中sqlite tableview的demo
点击cell上面的按钮进行当前cell的展开和收缩,并只进行当前行的刷新。
tableview cell 倒计时
iOS tableview 展开与收回
本 Demo 仿造了美团外卖和礼物说,分别实现了两个 TableView 之间和 TableView 与 CollectionView 之间的联动效果,效果见 gif 图。 由于工程的文件比较大,代码传不上去,超过了大小。 【GitHub - OC版本】下载...
利用swift写的简单的tableView的使用,包括cell移动、删除、增加
ios中tableview下拉出发tableview更新的效果实现。 iPhone5.1 测试成功
tableView的多项选择删除
iOS tableview 索引
swift tableview cell展开/折叠 填写信息, tableview自适应高度,tableview的cell嵌套tableview 自适应