デリゲートの拡張というのは難しいですが、
継承や各デリゲートにdidSelectAtIndexPathを書かなくとも
UITableViewのセルが選択された時にハイライトを消すという方法はあります。
UITableViewのセルが選択されたタイミングは、デリゲートだけでなく、
UITableViewSelectionDidChangeNotificationという通知で受け取る事ができます。
これをAppDelegateなどに書いておくと、全てのUITableViewで選択された時に
didSelectAtIndexPathを呼ぶことが可能です。
lang
1
2- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
3
4 NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
5 [nc addObserver:self
6 selector:@selector(didSelectTableViewCellNotification:)
7 name:UITableViewSelectionDidChangeNotification
8 object:nil];
9
10 return YES;
11}
12
13- (void)didSelectTableViewCellNotification:(NSNotification *)notification
14{
15 UITableView *tableView = (UITableView *)notification.object;
16 [tableView deselectRowAtIndexPath:tableView.indexPathForSelectedRow animated:YES];
17}