Closed JanC closed 12 years ago
I don't have the iOS 6 beta installed - you're gonna have to solve this one yourself :)
ok, I'll have a look on that ;)
thanks for this library btw.
It looks like on a iOS 6 device, when the TokenField is deselected (UIControlEventEditingDidEnd), the selector for UIControlEventEditingChanged is not called whereas it is called on iOS 5.
The selector for this event is the one which hides the search table (tokenFieldTextDidChange:) hence why the table remains visible.
A simple workaround would be to explicitly call the hide method in the didSelectRowAtIndexPath:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
id representedObject = [resultsArray objectAtIndex:indexPath.row];
TIToken * token = [tokenField addTokenWithTitle:[self displayStringForRepresentedObject:representedObject]];
[token setRepresentedObject:representedObject];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
// fix for iOS 6
[self setSearchResultsVisible:NO];
}
Looks good, I'll add it in shortly.
Hi, When I run the example on a iOS 6 (compiled for iOS 5.1), the search result table does not disappear when I select an entry
cheers ;)