From 4fbf31e104d5ff988f26762169107ab65d7c74ef Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 7 Nov 2014 17:28:12 +0100 Subject: [PATCH] Fix invalid state bar when editting a contact --- Classes/LinphoneUI/UIContactDetailsHeader.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneUI/UIContactDetailsHeader.m b/Classes/LinphoneUI/UIContactDetailsHeader.m index 6c78c743b..090a4dd34 100644 --- a/Classes/LinphoneUI/UIContactDetailsHeader.m +++ b/Classes/LinphoneUI/UIContactDetailsHeader.m @@ -339,7 +339,8 @@ - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { if(contactDetailsDelegate != nil) { - [self performSelector:@selector(updateModification) withObject:nil afterDelay:0]; + //add a mini delay to have the text updated BEFORE notifying the selector + [self performSelector:@selector(updateModification) withObject:nil afterDelay:0.1]; } return YES; } @@ -363,7 +364,8 @@ [LinphoneLogger logc:LinphoneLoggerWarning format:"Not valid UIEditableTableViewCell"]; } if(contactDetailsDelegate != nil) { - [self performSelector:@selector(updateModification) withObject:nil afterDelay:0]; + //add a mini delay to have the text updated BEFORE notifying the selector + [self performSelector:@selector(updateModification) withObject:nil afterDelay:0.1]; } return TRUE; }