From 843becd6cea5f34976ee022ee8e1c18b7c68d341 Mon Sep 17 00:00:00 2001 From: jverkoey Date: Sat, 26 Feb 2011 05:56:00 -0500 Subject: [PATCH] [Core] Clarify the deprecation notice for isEmptyOrWhitespace. --- src/Three20Core/Headers/NSStringAdditions.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Three20Core/Headers/NSStringAdditions.h b/src/Three20Core/Headers/NSStringAdditions.h index 7d90a337cc..64cc7bd3be 100644 --- a/src/Three20Core/Headers/NSStringAdditions.h +++ b/src/Three20Core/Headers/NSStringAdditions.h @@ -30,7 +30,24 @@ /** * Determines if the string is empty or contains only whitespace. - * @deprecated Use TTIsStringWithAnyText: instead. + * @deprecated Use TTIsStringWithAnyText() instead. Updating your use of + * this method is non-trivial. See the note below. + * + * Notes for updating your use of isEmptyOrWhitespace: + * + * if (!textField.text.isEmptyOrWhitespace) { + * + * becomes + * + * if (TTIsStringWithAnyText(textField.text) && !textField.text.isWhitespaceAndNewlines) { + * + * and + * + * if (textField.text.isEmptyOrWhitespace) { + * + * becomes + * + * if (0 == textField.text.length || textField.text.isWhitespaceAndNewlines) { */ - (BOOL)isEmptyOrWhitespace __TTDEPRECATED_METHOD;