Reputation: 364
here problem is that when i pressed first row Plus button it change value of second Qty.
i need to change particular Qty change as per row select.
i also given viewWithtag on textfield but can't work properly.
thanks in advance.
Upvotes: 0
Views: 157
Reputation: 1973
set the tag for UIButton
& UITextField
as:
set Button tag as [indexpath row]+1
set Textfield tag as ([indexpath row]+1)* 10
so there will be no mismatch of tags
When a button is pressed check the condition like this:
UITextField * textfield = (UITextField *)[self.view viewWithTag:([sender tag]+1)*10];
if([sender tag] == 1)
textfield.text = //value you want to set
Upvotes: 2