ios - How to know which row and which section is editing -


i have 10 sections , each section has 1 row. row contain 5 text fields. if change text field value how update particular row ?

it should not effect sections rows. have taken customview cell designing.

check https://stackoverflow.com/a/2... answer. set tag textfield , use dictionary store values, otherwise reusing cell textfield text re-appearing in other cells.

cellforrowatindexpath return section , row... own logic in dict store textfield values...

[txtfield addtarget:self  action:@selector(textfielddidchange:)    forcontrolevents:uicontroleventeditingchanged];  -(void)textfielddidchange:(uitextfield *)txtfield  {  uilabel *label = (uilabel *)[txtfield.superview viewwithtag:100];  nsstring *labelstring = label.text;  nsstring *textfieldstring = txtfield.text;  [amounts setobject:textfieldstring forkey:labelstring];  } 

maintain unique key cell or textfield store in dict, check dict key exist, if exist change value else add new key value.

i think is, want...do best...


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -