Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Latest fixes #3

Merged
merged 1 commit into from

2 participants

@pinda

No description provided.

@sergiomtzlosa sergiomtzlosa merged commit 1e89878 into sergiomtzlosa:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 25, 2012
  1. @pinda
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 5 deletions.
  1. +5 −5 MultiContactsSelector/SMContactsSelector.m
View
10 MultiContactsSelector/SMContactsSelector.m
@@ -99,7 +99,7 @@ - (BOOL)isLetter
for (int i = 0; i < [letters count]; i++)
{
- if ([[[self substringFrom:0 to:1] uppercaseString] isEqualToString:[letters objectAtIndex:i]])
+ if ([[[self substringToIndex:1] uppercaseString] isEqualToString:[letters objectAtIndex:i]])
{
isLetter = YES;
break;
@@ -229,11 +229,11 @@ - (void)viewDidLoad
}
NSMutableDictionary *info = [NSMutableDictionary new];
- [info setValue:[NSString stringWithFormat:@"%@", [[nameString stringByReplacingOccurrencesOfString:@" " withString:@""] substringFrom:0 to:1]] forKey:@"letter"];
+ [info setValue:[NSString stringWithFormat:@"%@", [[nameString stringByReplacingOccurrencesOfString:@" " withString:@""] substringToIndex:1]] forKey:@"letter"];
[info setValue:[NSString stringWithFormat:@"%@", nameString] forKey:@"name"];
[info setValue:@"-1" forKey:@"rowSelected"];
- if ((objs != @"") || (![[objs lowercaseString] containsString:@"null"]))
+ if ((objs != @"") || ([[objs lowercaseString] rangeOfString:@"null"].location == NSNotFound))
{
if (requestData == DATA_CONTACT_EMAIL)
{
@@ -319,7 +319,7 @@ - (void)viewDidLoad
NSString *name = [dict valueForKey:@"name"];
name = [name stringByReplacingOccurrencesOfString:@" " withString:@""];
- if ([[[name substringFrom:0 to:1] uppercaseString] isEqualToString:[arrayLetters objectAtIndex:i]])
+ if ([[[name substringToIndex:1] uppercaseString] isEqualToString:[arrayLetters objectAtIndex:i]])
{
[array addObject:dict];
}
@@ -634,7 +634,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
}
else
{
- if ([[[name substringFrom:0 to:1] uppercaseString] isEqualToString:[arrayLetters objectAtIndex:section]])
+ if ([[[name substringToIndex:1] uppercaseString] isEqualToString:[arrayLetters objectAtIndex:section]])
{
i++;
}
Something went wrong with that request. Please try again.