This file contains hidden or 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
// Get the full search view controller lazily, set it upt as the delegate for | |
// the search manager and present it to the user modally. | |
SearchManager * manager = nil; | |
SearchViewController * controller = searchViewController = [[SearchViewController alloc]initWithNibName:@"SearchView2_pad" bundle:[NSBundle mainBundle]]; | |
// Get the search manager lazily and set up the document. | |
manager = self.searchManager; | |
manager.document = self.document; |
This file contains hidden or 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
ABAddressBookRef addressBook = ABAddressBookCreate(); // create address book record | |
ABRecordRef person = ABPersonCreate(); // create a person | |
NSString *phone = @"0123456789"; // the phone number to add | |
//Phone number is a list of phone number, so create a multivalue | |
ABMutableMultiValueRef phoneNumberMultiValue = | |
ABMultiValueCreateMutable(kABPersonPhoneProperty); | |
ABMultiValueAddValueAndLabel(phoneNumberMultiValue ,phone,kABPersonPhoneMobileLabel, NULL); |