在 UITableview 中创建 2 列 [英] Create 2 column in UITableview

查看:49
本文介绍了在 UITableview 中创建 2 列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
iPhone UITableView 中的多列

任何人都可以帮助如何在 ios 中创建 2 列 tableview?

Anyone help how to create 2 column tableview in ios?

推荐答案

您必须为此任务创建自定义单元格视图.并在 yourTable View 中添加这个自定义单元格.

You have to create custom cell view for this task. And add this custom cell in yourTable View.

查看此链接了解更多信息链接 链接2

Check this link for more info Link Link 2

根据您的查询,您只需创建 customButton 而不是图像,然后将图像和 tagValue 设置为该按钮,因此无论何时按下按钮,您都可以使用 tagValue 进行识别.

According to your query you just make customButton instead of images and then set image and tagValue to that button, so whenever you will press button you can identify using tagValue.

对于你的表格行

bt1.tag = [NSString stringWithFormat:@"%d0",indexPath.row];
bt2.tag = [NSString stringWithFormat:@"%d1",indexPath.row];

然后操纵这个..:)

这篇关于在 UITableview 中创建 2 列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆