![](/img/trans.png)
[英]Clear all UITextField changes in a UITableView with a UIButton
[英]iphone UITextField changes in a UITableView with a UIButton
這里的問題是,當我按下第一行加號按鈕時,它會改變第二個數量的值。
我需要根據行選擇更改特定的數量更改。
我也在textfield上給了viewWithtag但是無法正常工作。
提前致謝。
將UIButton
和UITextField
的標記設置為:
將Button標簽設置為[indexpath row]+1
set Textfield標簽為([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 row]。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.