Created
November 8, 2012 05:00
-
-
Save samsoir/4036885 to your computer and use it in GitHub Desktop.
Problem code abstract
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)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
SCContactPerson *contactPerson = [self.contactSelectionTableDataArray objectAtIndex:indexPath.row]; | |
[self decorateContactPerson:contactPerson fromFbUser:self.userDict]; | |
[contactPerson updateRecord:contactPerson.ABRecordID error:nil]; | |
if ([contactPerson ABRecordID] == kABRecordInvalidID) | |
{ | |
ABAddressBookRef addressBook = SCAddressBookCreate(NULL, NULL); | |
ABRecordRef addressBookRecord = [self copyPersonRecordRefFrom:contactPerson]; | |
UINavigationController *navigationController = [[[UINavigationController alloc] | |
initWithRootViewController:[self newPersonViewControllerFor:addressBookRecord withAddressBook:addressBook]] autorelease]; | |
[self.navigationController presentViewController:navigationController animated:YES completion:^{ | |
}]; | |
CFRelease(addressBookRecord); | |
CFRelease(addressBook); | |
} | |
else | |
{ | |
[self contactPersonSelected:contactPerson]; | |
} | |
[[tableView cellForRowAtIndexPath:indexPath] setSelected:NO animated:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment