i have class contains multiple textfields. 2 of these textfields allow user enter password , password confirmation.
@property (nonatomic, strong) uitextfield *password; @property (nonatomic, strong) uitextfield *passwordconfirmation;
i have created new class handles displaying password strength. class contains 2 properties password , password confirmation (as other code handles checking of password , displaying strength).
@interface passwordchangeview : uiview @property (nonatomic, strong) iboutlet uitextfield *password; @property (nonatomic, strong) iboutlet uitextfield *passwordconfirmation;
inside first class create property of passwordchangeview , set 2 properties original properties.
@property (nonatomic weak) iboutlet passwordchangeview *passwordchangeview; self.password = self.passwordchangeview.password; self.passwordconfirmation = self.passwordchangeview.passwordconfirmation;
i have checked in debugger , pointers same.
however when enter text into: self.passwordchangeview.password, text in self.password remains same.
i have thought because both point same object, changing text in 1 uitextfield update other one.
if question not clear enough, please let me know , edit straight away. appreciated.
many thanks.
because pointers same, both point same thing. if set *b = *a
, changing text of *b
cause outlet of *a
update.
you need set text of both @ same time, without changing pointers.
Comments
Post a Comment