When the following code executes, it logs "0" even though the indexPath.row selected is "1".
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSInteger location = indexPath.row;
[userDefaults setInteger:location forKey:@"savedlocations"];
NSInteger location2 = [userDefaults integerForKey:@"savedlocation"];
NSLog(@"l: %ld", location);