Created
September 30, 2014 13:41
-
-
Save patzearfoss/c80d25ef11596c3f172a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+- (void)willSave | |
+{ | |
+ static const unichar kUnicharMax = USHRT_MAX; | |
+ NSString *heavyString = [NSString stringWithCharacters:&kUnicharMax length:1]; | |
+ | |
+ self.firstNameSortValue = [self.firstName length] ? self.firstName : heavyString; | |
+ self.lastNameSortValue = [self.lastName length] ? self.lastName : heavyString; | |
+ self.companySortValue = [self.company length] ? self.company : heavyString; | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment