Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Core] Clarify the deprecation notice for isEmptyOrWhitespace.

  • Loading branch information...
commit 843becd6cea5f34976ee022ee8e1c18b7c68d341 1 parent 5b6e5c9
@jverkoey jverkoey authored
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/Three20Core/Headers/NSStringAdditions.h
View
19 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;
Please sign in to comment.
Something went wrong with that request. Please try again.