在一个UITableView iphone的UITextField变化有一个UIButton
问题描述:
在一个UITableView iphone的UITextField变化有一个UIButton
这里的问题是,当我按下第二数量的第一行加按钮,它的变化值。
我需要根据行选择更改特定的数量更改。
我也给textWithtag文本字段,但不能正常工作。
在此先感谢。
答
设置标签为UIButton
& UITextField
为:
SET按钮标记为[indexpath row]+1
集文本字段标签作为([indexpath row]+1)* 10
所以不会有标签不匹配
当按下按钮检查像这样的条件:
UITextField * textfield = (UITextField *)[self.view viewWithTag:([sender tag]+1)*10];
if([sender tag] == 1)
textfield.text = //value you want to set
答
设置textfield等于[indexpath行]的标签。
我们无法看到屏幕截图。 – Ravin 2011-04-13 07:05:19