从TableView中检索值

时间:2016-12-01 17:51:11

标签: ios swift uitableview

Screenshot

点击提交按钮时,我想从TableView中检索amount.text

我尝试了所有我知道的内容,但仍然无法检索amount.text

任何人都可以给我建议或解决方案吗?

1 个答案:

答案 0 :(得分:0)

您创建了一个NSDictionary,并保存了所有类型及其计数。使这个实例变量,以便您可以轻松访问它。然后基于indexPath.row,你将得到每个对象和它; s count。

{
{
type = Apple
count = 0
},
{
type = Orange
count = 0

},
{
type = Lemon
count = 0

},
{
type = Pineapple
count = 0

},
{
type = Grape
count = 0

}

} 

您必须保留这种数据形式,然后点击每一行的每个字典都很容易,这也很重要。然后你就可以得到你想要的一切。

相关问题