Enable UIBarButtonItem if multiple UITextFields are all populated

Posted by CrystalSkull on Stack Overflow See other posts from Stack Overflow or by CrystalSkull
Published on 2010-04-14T18:31:35Z Indexed on 2010/04/14 18:33 UTC
Read the original article Hit count: 298

I have 3 UITextFields in a grouped UITableView and am trying to figure out the correct logic to only have my 'Save' UIBarButtonItem enabled when none of the UITextFields are empty.

I'm currently using the - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string UITextField delegate method to detect changes to the field character by character, but it is providing inconsistent results.

Any ideas?

© Stack Overflow or respective owner

Related posts about uitextfield

Related posts about iphone