THContactPicker
THContactPicker copied to clipboard
How to add Tag to perform different Get methos for contact view Picker?
I would like to do some thing like this below, could any one help me out in acheving it.
-
(void)contactPickerTextViewDidChange:(NSString *)textViewText {
[self.contactPickerView becomeFirstResponder]; NSString *sql;
if ([textViewText isEqualToString:@""]){ } else {
if(contactpicker.tag==1) sql = [NSString stringWithFormat: @"Select id, Name, lastname, firstname ORDER BY lastname LIMIT 25", textViewText,textViewText,textViewText]; NSLog(@"%@",sql);
if(contactpicker.tag==2) sql = [NSString stringWithFormat: @"Select id, Name, lastname, firstname ORDER BY lastname LIMIT 25", textViewText,textViewText,textViewText];
NSLog(@"%@",sql);
SFRestRequest *request = [[SFRestAPI sharedInstance] requestForQuery:sql]; [[SFRestAPI sharedInstance] send:request delegate:self];
//self.filteredContacts = [self.contacts filteredArrayUsingPredicate:predicate];
}
[self.tableView reloadData];
}