如何在 UITableView 中选择多行 [英] How can I select multiple rows in UITableView

查看:31
本文介绍了如何在 UITableView 中选择多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在列表中显示一些选定的联系人,然后我需要一个功能来一次选择多个联系人,然后在单击按钮时它应该会向选定的联系人发送电子邮件.

I want to display some selected contacts in a list and then I need a feature to select multiple contacts at a time and then on clicking a button it should trigger an email to the selected contacts.

为此,我使用 UITableView 来显示联系人,但我找不到任何方法无法对 UITableView 进行多项选择.在做一些谷歌搜索时,我发现 UITableView 不支持多选.

For this I am using UITableView to display the contacts but I am not able to find any way to unable the multiple selection for UITableView. On doing some google search I found that UITableView does not support multiple selection.

有什么办法可以在 UITableView 中选择多行或者我应该为此使用哪个控件.

Is there any way to select multiple rows in UITableView or which control should I use for this purpose.

推荐答案

您可以在完成选择后使用 cellAccessorytype 来选择一行.只需检查哪个单元格具有附件标记,将该内容放入数组中并使用它们.

You can use cellAccessorytype for selecting a row when finished with the selection. Just check which cell has accessory mark, put that content into the array and use them.

这篇关于如何在 UITableView 中选择多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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